• Resolved thephrase

    (@thephrase)


    Although in other parts of the code this attribute works, it doesn’t work in one situation. Am I doing something wrong here? I can’t seem to find my fault. Maybe you can help.
    Thanks!

    Problem
    I can’t get the [no_message=’Yes’] attribute to work in the following situation:

    
    [restricted block_logged_in='Yes' no_message=’Yes’]
      [login redirect_page="/voor-cursisten/bladmuziek/"]
    [/restricted]
    [restricted no_message=‘Yes’]
      [login-logout-toggle]
    [/restricted]

    When the user is not logged in: It shows the default “You have to be logged in..etc” and when the user is logged in, it shows the default text “This content is only for not logged in users” (translated from dutch).

    • This topic was modified 3 years, 10 months ago by thephrase.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi phrase,

    Having two login forms on the same page will usually cause a conflict.

    What are you trying to accomplish on this page? Are you trying to show the login form if someone is not logged in, and hide the form and show a logout button if someone is logged in?

    If so, a better way to accomplish that would be to create a separate page and put the [logout] shortcode on it. Then, on your page in question, try the following:

    [restricted block_logged_in="Yes"]
    [login redirect_page="/voor-cursisten/bladmuziek/"]
    [/restricted]
    [restricted no_message="Yes"]
    <a href="https://your-site.com/url-of-new-logout-page-you-created/">Log Out</a>
    [/restricted]
    Thread Starter thephrase

    (@thephrase)

    That worked!

    (To the first line I added a no_message)

    [restricted block_logged_in="Yes" no_message="Yes"]

    It also works when you change the link into a button block.

    So, thank you very much!

    • This reply was modified 3 years, 10 months ago by thephrase.
    • This reply was modified 3 years, 10 months ago by thephrase.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Attribute [no_message=’Yes’] not working in specific situation’ is closed to new replies.