WordPress.org

Forums

swap login link for username when logged in (3 posts)

  1. jcpcosta
    Member
    Posted 1 year ago #

    Hi everyone!

    This is my site 'http://mlearning.mdsinsure.com/'
    I added login and register links to the header and they link to pages where these forms are displayed. The thing is, when users log in, I want that these links disappear and the username and logout link show up. But I don't know how to do this as I'm not a programmer. Can anybody help me please?

    I'm also using these plugins: Theme my login and Press Permit Core + Eyes Only: User Access Shortcode.

  2. Dave Naylor
    Member
    Posted 1 year ago #

    You can look after the menu issue by using the if menu plugin. It allows conditional logic based on logged in state so you can show/hide menu items.

    As for displaying the username, that's a bit more difficult. You'd probably have to edit your template and add some PHP after the call to the navigation menu. It's not too difficult to achieve but you do have to get your hands dirty.

    Alternatively, maybe something like the User Meta Shortcodes plugin would provide what you need (although not in the menu).

  3. jcpcosta
    Member
    Posted 1 year ago #

    WPRanger,

    thank you for your reply. I have the links on the header, not on the menu!

Topic Closed

This topic has been closed to new replies.

About this Topic