Skip Navigation

[Gelöst] Conditional display for content templates edited in Gutenberg

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I want to display blocks based on a condition.

Solution: Toolset Blocks has a Conditional Block that can conditionally display content.

Relevant Documentation:
Take a look at our lesson "Display Content Conditionally in WordPress".

This support ticket is created vor 5 Jahre. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 Antwort, has 2 Stimmen.

Last updated by Christian Cox vor 5 Jahre.

Assisted by: Christian Cox.

Author
Artikel
#1223512

I am trying to use Gutenberg to edit content-templates, and in my content template I have some conditional display.

Now I would like to be able to wrap one or more Gutenberg blocks into that conditional display.

How can you achieve this in Gutenberg (or the block editor as its named now)

#1223607

Hi, we're working on some updates that will expand the Toolset integration in the block editor, but for now it's not really easy to add conditional display at the block level. In very simple cases you can use a shortcode block to insert the wpv-conditional using your own code, but it's not well integrated into the GUI and in complex cases it will break down fairly quickly. At this time it's best to use the traditional Content Template editor to implement conditional HTML.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.