• Resolved zompus

    (@zompus)


    Hey,

    I’m trying to get it so when a user is logged in it’ll show their username, e.g. “Hi Matt, welcome back”.

    Anyone know the code for this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter zompus

    (@zompus)

    Sorted, found a way.

    <?php if (is_user_logged_in()){ global $current_user; ?>
    Hello, <strong><?php echo $current_user->first_name; ?></strong>!
    <?php } endif; ?>

    Which file did you place this code and where? I am looking to implement the same feature as well. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to show logged in as?’ is closed to new replies.