WordPress.org

Ready to get started?Download WordPress

Forums

BAW Login/Logout menu
Add username to logged in text (3 posts)

  1. Scott
    Member
    Posted 1 year ago #

    Love the plugin! I am just trying to figure out how to do one thing with it. When a user is logged in I want it to say username is logged in. I think this is probably an easy add but I am not sure where to do this. Any help would be appreciated.

    http://wordpress.org/extend/plugins/baw-login-logout-menu/

  2. windmark
    Member
    Posted 1 year ago #

    I don't know if there is a specific way to do that with the plugin, but it's really easy if you edit the php code. Just add the following code where you are sure that a user is logged in.

    $current_user = wp_get_current_user();
    echo "You are logged in as " . $current_user->user_login;

    You can get much info from that function, as this page shows http://codex.wordpress.org/Function_Reference/wp_get_current_user

  3. Scott
    Member
    Posted 1 year ago #

    Thanks windmark. I did see this code but I am trying to get it on the menu like this plugin is. I am going to play with the code a bit this afternoon.

    On a side note, Fringe?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.