WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Tags to display profile data, like name etc. (4 posts)

  1. modifiedcontent
    Member
    Posted 4 years ago #

    I know this is a very basic, dumb question, but I can't find the answer anywhere. Probably using the wrong keywords... For example:

    What tag displays the name of the logged-in user?

    Where can I find a list of these tags?

  2. Mark / t31os
    Moderator
    Posted 4 years ago #

  3. modifiedcontent
    Member
    Posted 4 years ago #

    Thanks t31os!

    I needed it to prefill form fields in a plugin. I had to put this in the preceding php:

    global $current_user;
    get_currentuserinfo();

    And then this in the form:

    <input value="<?php echo $current_user->user_firstname; ?>">

    A little more complicated than I'd hoped, but it works.

  4. Mark / t31os
    Moderator
    Posted 4 years ago #

    First link via google... ;) Quicker then trying to search the codex (seems to be lacking a proper search right now).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.