Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to… Get profile page author?


  • autox420
    Participant

    @autox420

    …members/username/profile

    Can i somehow get the author of the profile?
    Im trying to use this code but it doesnt seem to work.

    <?php
        $author = get_the_author();
    
        echo 'Username: ' . $current_user->user_login . '<br />';
        echo 'User first name: ' . $current_user->user_firstname . '<br />';
        echo 'User last name: ' . $current_user->user_lastname . '<br />';
        echo 'User display name: ' . $current_user->display_name . '<br />';
        echo 'User ID: ' . $current_user->ID . '<br />';
        echo 'User display name: ' . $current_user->description . '<br />';
    ?>
Viewing 1 replies (of 1 total)

  • autox420
    Participant

    @autox420

    Dont need help!
    Solved what i needed!

    <?php 
    $user_meta = get_userdata(bp_displayed_user_id());
    echo($user_meta->description);
    ?>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar