Site logo

[Resolved] Display Rules (basic?) usage

Home Forums Support [Resolved] Display Rules (basic?) usage

Home Forums Support Display Rules (basic?) usage

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1818874
    Fred

    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

    #1818903
    David
    Staff
    Customer Support

    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:

    #1818912
    Fred

    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! 🙂

    #1819533
    David
    Staff
    Customer Support

    No problems – glad to be of help

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.