• I can currently display the $user_login (username) of a user on our homepage – eg: “hello username!”, but instead, I would like to display the “Display Name” that the user selects in their profile. – eg: “hello display_name!”

    My current code is:

    <?php
    get_currentuserinfo() ;
    global $user_level;
    if ($user_level > 0) {
    echo ("hello " . $user_login . "!");
    } ?>

    I would like it to be:

    <?php
    get_currentuserinfo() ;
    global $user_level;
    if ($user_level > 0) {
    echo ("hello " . $user_display_name . "!");
    } ?>

    Any ideas?

Viewing 1 replies (of 1 total)
  • The dashboard does that, doesn’t it? Search the core files for “howdee” and I think you’ll see the code nearby.

Viewing 1 replies (of 1 total)
  • The topic ‘How do I display user “display name”?’ is closed to new replies.