Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to echo “nice_username” from post_author ?

anandasama here’s acouple of codes that will help you. I think I know what you’re planning.

This will put the user’s name with link to their buddypress profile:

<?php echo post_author_link();?>

This will get the user’s login name:

<?php echo get_user_name( get_post_author_id() ); ?>

This is you can send message like PM but it uses message in Buddypress:

<a href="<?php echo get_option('home') ?>/members/
<?php global $current_user;get_currentuserinfo();echo($current_user->user_login);
?>/messages/compose/?r=<?php echo get_user_name( get_post_author_id() ); ?>">Send Message</a>

Skip to toolbar