Skip Navigation

[Escalated to 2nd Tier] Conditional Block not working in GeneratePress Elements

This support ticket is created 3 years, 7 months 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
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 5 replies, has 2 voices.

Last updated by Christian Cox 3 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#2056675

Hello,

In GeneratePress Elements, I have created a Block and assigned it as a Content Template. Inside, I have added a Conditional Block. The conditions in the block are:

( ( '[wpv-post-type ]' eq 'course' ) OR ( '[wpv-post-type ]' eq 'chapter' ) OR ( '[wpv-post-type ]' eq 'lesson' ) )

The problem is that the Conditional Block is not executing and showing nothing.

To debug this problem, I created a Content Template in Toolset with the above conditions and the Conditional Block is very much executing.

Is Toolset Conditional Block having any compatibility problems with GeneratePress Elements or am I missing something?

Thanks,

Alok

#2056817

Hello,
Yes there are currently some compatibility issues with GeneratePress Elements and conditional blocks. We do not recommend using conditional blocks in the context of Elements until those compatibility issues are resolved. We have a similar erratum post here:
https://toolset.com/errata/content-within-conditional-block-added-to-generatepress-premium-elements-output-as-shortcodes/

#2056843

Hello,

Understood.

Is there any ETA on when it is going to be fixed?

Thanks,

Alok

#2056909

Not at this time, unfortunately. I can keep you posted through this ticket when there is any progress on this issue if you'd like.

#2057205

Hello,

Perfect.

The only reason that I am giving more preference to creating all the required hooks, content templates etc in GeneratePress Elements is to keep things straight & simple. No doubt Toolset is also as powerful as GeneratePress Elements, but is completely focussed on extending the posts related functionality (i.e. singular, archive, content templates, custom views, custom filters, etc) of the site.

Please keep me updated once there is some fix on this problem.

Thanks,

Alok

#2058235

Okay I have linked this ticket to our internal tracker. I will update you here when I have progress to report.