• Resolved digital-skraps

    (@digital-skraps)


    I’m working on a site for a client where the landing page will be a login and then take you to the content. its for business members only.

    What i need is to display the visitors user name.

    so if Tom logs in, at the top of the page it needs to say “Hey Tom,”

    how could i go about doing this

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter digital-skraps

    (@digital-skraps)

    <?php
    global $current_user;
    if ( isset($current_user) ) {
        echo $current_user->user_login;
    }
    ?>

    This was able to achieve what was needed

    Alyson

    (@rn2web)

    thanks so much!

    Alyson

    (@rn2web)

    with this global declaration, only i need use this?

    <?php $current_user; ?>

    for show username? somebody can help?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display visitor user name’ is closed to new replies.