WordPress.org

Ready to get started?Download WordPress

Forums

Show User's Displayed Name (10 posts)

  1. Nate
    Member
    Posted 5 years ago #

    How can I show the user's ID/Name in the side bar with something like <?php the_author_ID(); ?>? Like, Welcome (user's name).

  2. MichaelH
    Member
    Posted 5 years ago #

    You mean like someone logged in?

    <?php
    setup_userdata();
    echo 'Howdy '. $user_identity . $user_ID	;
    // print_r($userdata); uncomment this to show whole array of userdata
     ?>
  3. Nate
    Member
    Posted 5 years ago #

    Yes! But can I put the $user_ID in a link? Such as "/members?user=$user_ID"?

  4. MichaelH
    Member
    Posted 5 years ago #

    Like
    '?author=' . $user_ID;

    Related:
    Author_Templates
    wp_list_authors()
    Template:Tag_Author_Tags

  5. Nate
    Member
    Posted 5 years ago #

    Like, I have a members page. There's a link /members?user=username
    Can I have in a link /members?user= then your username, like <a href="/members?user=$user_ID">Your Profile</a>, and if so how?

  6. MichaelH
    Member
    Posted 5 years ago #

    http://www.looneylunar.com/member-directory/?user=1

    If you are using a membership plugin of some sort please let us know which one you are using.

  7. Nate
    Member
    Posted 5 years ago #

    I'm using "Profiler"

  8. Nate
    Member
    Posted 5 years ago #

    Can someone please help?

  9. MichaelH
    Member
    Posted 5 years ago #

    I'm sorry, what more do you need?

  10. Nate
    Member
    Posted 5 years ago #

    How can I create a "Your Profile" link with Profiler? It'll take you to YOUR profile if your logged in. A universal link.

    [moderated--bump removed. Please refrain from bumping as per Forum Rules]

Topic Closed

This topic has been closed to new replies.

About this Topic