Skip Navigation

[Resolved] Conditional and Reusable blocks

This thread is resolved. Here is a description of the problem and solution.

Problem:
The conditional block does not work as expected inside a reusable block.

Solution:
This feature is not available in Toolset Blocks. You are welcome to submit a feature request requesting that support be added: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

In the other hand, you can reuse a content template in the "same" way as a reusable block. Create a content template and use the conditional block inside of it. Then reuse it, with the "Content Template" block, everywhere you want.

This support ticket is created 3 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 3 voices.

Last updated by Meg 3 years ago.

Assisted by: Jamal.

Author
Posts
#2222163

Meg

Hi
I'm trying to add this simple condition into a reusable blocks and it does not work.
( ( '[wpv-current-user info="role"]' eq 'administrator' ) )
Even debug does not work with reusable blocks
There is a way to fix this?
thanks
Meg

#2222301

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Meg

It is correct that the Conditional block does not work as a re-usable block, I'm afraid.

You are welcome to submit a feature request requesting that support be added: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#2222355

Hello Meg and thank you for contacting the Toolset support.

I was able to reproduce this issue in a clean install, and it is being escalated our 2nd Tier team. I'll keep you updated about it as soon as we have something to share.

In the meantime, as a workaround, use a content template instead of a reusable block. You can then reuse this content template everywhere in the site in the same way as a reusable block. Does it make sense?
You can check an example on an example I prepared here hidden link
Check the page here hidden link

I hope this helps. Let me know if you have any questions.

#2222409

Meg

Thank you, using a content template is a great workaround
My issue is resolved now. Thank you!