Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add “Anonymous” to menu bar


  • fullenchilada
    Participant

    @fullenchilada

    Hey guys,

    I’d like to add the “Anonymous” field to the menu bar on my site (just like the one on here when you are not logged in). At the moment I only have a wifi-looking icon, which looks more like a clickable rss feed. Would be great if you guys can help me out. Looking forward to hearing from you

    Greetz
    Sharoo

Viewing 1 replies (of 1 total)

  • Henry Wright
    Moderator

    @henrywright

    You can use the is_user_logged_in() function to check. For example

    if ( is_user_logged_in() ) {
        // This user isn't logged in.
        echo 'Anon';
    } else {
        // This user is logged in.
        // Do something else.
    }
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar