Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How do I show something just if the user is *not* logged in?

  • Hello, I want to put a message on the forums that says “Sorry, your are not currently logged in. You may do so here” I’ve got it down, except the part where I want the message to disappear if the user *is* logged it.

    How can I do this? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

  • @mercime
    Moderator

    @mercime

    Something like this –

    `

    Sorry, your are not currently logged in. You may do so here ..

    `

    then add styling in stylesheet e.g.

    `p.not-logged-in {
    color: #000066;
    font-weight: bold;
    }`

    Adjust to taste.

    Hey Mercime! Thanks for the reply.

    Unfortunately, I can’t get the text to appear :( the “ is what is confusing me, because the user must be logged in to see it?

    nevermind! I was placing it wrong in the php file… i think it’s working


    @mercime
    Moderator

    @mercime

    Good, it should :-) The exclamation mark before is_user_logged_in means “not” Ergo, it’s means the paragraph is seen if user is NOT logged in.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How do I show something just if the user is *not* logged in?’ is closed to new replies.
Skip to toolbar