Conditional Layouts Not Functioning Properly

We created a layout and despite setting the priority and conditions to spec, Pro is not displaying the layout when the conditions are met. This happens often when we set conditionals and I wish it was implemented better - perhaps with potential conflicts list or some guide to ensure the settings actually take.

Our layout (Single Article - Helping Hand) has a priority of 0 and set to run when Post Category is Helping Hand.

Yet for reasons we can’t explain, when a post is loaded from the category Helping Hand, the layout for (Single Article) is shown instead, which has a priority of 5 and condition of Post Type is Post.

I don’t understand what the point of setting the priority is if it’s just ignored. We even went so far as to change the conditional for (Single Post) layout to display only when Post Category is NOT Helping Hand and yet it still shows for that category anyway. We cleared all caches, tested incognito, etc. Can’t get this to work properly.

What is the story here?

Hi @co50,

Thanks for reaching out.
I have checked your website and found the problem described here. I have temporarily de-associated the Single Article layout, checked your post, and found the layout is still assigned to it. Even after clearing the cache multiple times, it was still the same layout. It seems that it might be a problem with cache. I would suggest you go through the common issue troubleshooting once to recognize the issue.

1.Theme Related Issue
2.Plugin Conflict
3.Theme Update related issue
4.CSS/JS Customization
5.Disabling Cache
6.Disabling CDN

If you discover that an issue is coming from a custom code or 3rd party plugin, kindly consult with a developer or contact the plugin author. Please note that we do not provide support for custom codes and 3rd party plugins.
If that does not help, please copy your live site to a staging server so we can troubleshoot freely without breaking your live site.
And give us access to the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

FWIW to help others, clearing/disabling Cloudflare, WPRocket, and Varnish did not fix this issue. We had to clear the Object Cache in order for the conditionals to work.

Since Object Cache Pro is installed on all Cloudways hosting accounts and it’s a pretty popular hosting service, maybe Themeco may consider either a message advising to clear this cache or forcing a clear of this cache itself if possible when conditionals are changed. Because this is the only known instance in 10 years that we’ve had to clear Object Cache for a page to show the proper version.

Hi @co50,

Thank you for sharing this information about the Object cache Pro.

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.