Forums

Get User Info (9 posts)

  1. obeattie
    Member
    Posted 6 years ago #

    Hi There All,

    I am trying to create a kind-of shortcut bar as an update to one of my themes (in an upcoming release). The shortut bar will have quick links to post, create pages, view user profile etc.

    Basically, what I need to know is this: can I active user information from WordPress. I would want to display things like username, link to edit profile page and sign out links.

    I already know how to make the bar show up only if the user is logged in; but how do I get username etc.?

    Many Thanks in Advance,
    Oliver
    ;)

  2. moshu
    Member
    Posted 6 years ago #

    Probably you should take a look at the http://codex.wordpress.org/Author_Templates page and all the resiurces linked from there.
    Also, http://codex.wordpress.org/Template_Tags#Author_tags

  3. obeattie
    Member
    Posted 6 years ago #

    But they may not be an author.. and it will appear at the top of every page, even when they're not the author of that page

  4. moshu
    Member
    Posted 6 years ago #

    Ah, I was at my first coffee :)
    "currentuserinfo" is the correct keyword to search - the forum and the Codex.

  5. obeattie
    Member
    Posted 6 years ago #

    Thanks - I will have a look ASAP.

    Cheers,
    Oli

  6. syncbox
    Member
    Posted 6 years ago #

    Is there a way to pass a user id in a link to the author.php file? For example, let's say you have a list of author level users in a page or menu.

    BOB
    FRED
    CINDY

    and you want users to click their names to go to their "author page"

    how do you pass the correct user id (author id?) to the file?

  7. moshu
    Member
    Posted 6 years ago #

    The links above have the answer. The right template tag will do the job for you.

  8. syncbox
    Member
    Posted 6 years ago #

    Yes, I managed to get the thing working... thanks

  9. syncbox
    Member
    Posted 6 years ago #

    I'd like to display a list of actual author-level users, but list_authors() seems to display all users, not just those with AUTHOR level access. Is there any way to write a query to return a list of just author-level users displaying their "display name"? I also need to generate a link to the author.php page passing their user_id

    HELP!

Topic Closed

This topic has been closed to new replies.

About this Topic