Skip to main content

Change button/text display based on condition

Comments

5 comments

  • Sandra Prunici

    Hi,

    You can do this with the Membership functionality. Therefore, you can create 2 blocks. In the first block add the first button and in the second block - the second button. For both blocks activate the Membership function and set-up which members do you want to see the first block and which one the second one. For more details about the Membership function, you can check this article and these YouTube tutorials.

    https://www.brizy.io/membership-in-brizy-wordpress/

    https://www.youtube.com/watch?v=Zp1DMIFUubg

    https://www.youtube.com/watch?v=ig5VvyRv34Q

    Best regards,
    Sandra

    0
  • Lee Taylor

    Thanks for the reply.

    1. I notice the ability to do this with blocks, though what about buttons within a block?

    2. I also recognize that not all of my user roles are displayed as an option. Note: I'm trying to simply change a button from "Log In" to "Log Out". See here: https://www.evernote.com/l/AHXeuG818-9KX4oqnD6ZnxVmu3GAz3dtVZM

    Can you please help provide a solution?

    Cheers!

    0
  • Sandra Prunici

    Hi,

    1 - Unfortunately, at the moment, the membership functionality can be added only to the blocks. Now, it isn't possible to add it to the element, columns or rows.

    2 - Did you try to scroll inside the Select element? See here.

    Thanks!

    Best regards,
    Sandra

    0
  • Lee Taylor
    1. So how do you suggest having a button that changes based on logged-in and logged-out?
    2. Since the membership functionality only exists in relationship to "blocks", how would you go about solving this issue? (Note: we cannot use the default login/logout button because it adds the input fields automatically. Is there a way to change this so that it just contains the button with the text "Log In" when the user is logged out, and "Log Out" when the user is logged in?)

    Please help provide some kind of solution, since the functionality we need doesn't seem possible even though it seems this should be an important "feature" that is included by default).

     

    Thanks!

    0
  • Sandra Prunici

    Hi,

    I can suggest watching this tutorial. It is a general presentation about the Membership functionality and here from minute 17:25, you can find exactly how you can create the log-in and log-out functionality.

    Let us know if we can help you with something else.

    Best regards,
    Sandra

    0

Please sign in to leave a comment.