• Hello,

    Is there a code to put on a page or post, in which wherever that code is it displays whoever is viewing the pages username, and maybe if they are not logged in it says guest.

    So I could have for example: Hello and welcome to the example page Elliot_Sowersby. etc…

    Many thanks,
    Elliot.

Viewing 1 replies (of 1 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I do it with a PHP bit.

    <?php if ( $user_ID ) : ?>
                   <p><?php printf(__('Welcome back, %1$s!'), $user_identity );?></p>
              <?php else : ?>
                   <p>Hi, Guest!</p>
              <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘How to put members username on a page?’ is closed to new replies.