Archived topic
Display Rules (basic?) usage
3 replies · Started by Fred on June 11, 2021
Hello support team!
I feel like I'm missing/misunderstanding a little something about display rules that prevent me to get the expected result.
Context - I'm following the tutorial video in the documentation for creating a custom post meta template (https://docs.generatepress.com/article/block-element-post-meta-template/). It's working great (and so powerful!!).
What's working - I would like to have a different meta template depending on post category. So I chose Location : Post Category > Category #1. It's working fine on single posts. Only targeted posts display the custom template. Great!
What's weird - Since I want it also displayed for those posts on the blog page with all the posts excerpts, I also chose Location > Blog. But then posts with other categories are also displaying that custom meta template. Excluding posts with other categories didn't work either...
Does Display Rules follow a "AND" logic (condition A AND B must be met to dsiplay)? Is the order of the rules important? I have tried different combinations (among which: Location > Entire site - Exclude > Post Category > Category B) and I really can't get the expected result...
Am I missing something? ^^
Have a great day,
Fred
Hi there,
for blog/archives you need to use a separate Block Element > Type: Content Template and create the entire post template.
This video shows how to have various different templates for different categories:
Argh! I knew I was missing some kind of logic link in my mind! I actually saw you shared that video to reply to someone else and I thought it was great. I just didn't realize somehow those two were complementary. Makes perfectly sense now, sorry for the trouble! :)
No problems - glad to be of help