WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Welcome user_identity problem (3 posts)

  1. Akram Taghavi-Burris
    Member
    Posted 6 years ago #

    I would like to place a message in the header so that when the user is logged in the message says Welcome: and their user name.

    I am using the following code:

    <div id="mylogin">

    • <?php { if ( ! is_user_logged_in() ) echo (''); else
      echo ('Welcome: ' .$user_identity) ;} ?>
      <?php {if ( ! is_user_logged_in() )
      include (TEMPLATEPATH . '/loginform.php'); else
      $link = '| ' . __('Logout') . '';
      echo apply_filters('loginout', $link);}?>

    </div>

    Orginally this code was placed embeded on the same page as the post. It worked fine. But then when I seprated the header as different file and then used the
    <?php get_header(); ?> function to pull it in, it doesn't work.

    Please let me know why.

    Thank you,
    --Akram Taghavi-Burris

  2. davey579
    Member
    Posted 6 years ago #

    I see you're using my loginform, take a look here (latest comment):

    http://wordpress.org/support/topic/89153?replies=8

    It is an updated version with a working logged-in-as function.

  3. Akram Taghavi-Burris
    Member
    Posted 6 years ago #

    Thank you so much it worked wonderfully.

Topic Closed

This topic has been closed to new replies.

About this Topic