ndiego / block-visibility

Conditional visibility controls for all WordPress blocks.
https://www.blockvisibilitywp.com
GNU General Public License v2.0
130 stars 10 forks source link

Wan't add some notice when block hide #1

Closed wangcode closed 3 years ago

wangcode commented 3 years ago

If i wan't add some notice when block hide, how can i do this

ndiego commented 3 years ago

Hi @wangcode if I am understanding your question correctly, the best way to do this is create another block with the content that you want people to see when the initial block(s) is hidden, and set the inverse visibility settings.

So for example, say you had a form that you have set to only show to logged-in users. You would create the notice (perhaps a cover block) to only show to logged-out users, and it could say something like "Log in to view the form".

Let me know if that doesn't answer your question.

wangcode commented 3 years ago

thanks @ndiego , There's no problem with your understanding, I'm already using the solution just like you told me. Thank you for your help, have a good day. : )

ndiego commented 3 years ago

Awesome, glad it is working for you!