[Resolved] I'm Confused-the New Display Rules seem more complicated?

Home Forums Support [Resolved] I'm Confused-the New Display Rules seem more complicated?

Home Forums Support I'm Confused-the New Display Rules seem more complicated?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #652358

    Maybe I’m missing something, but the old way of setting page headers seemed much simpler. You could set global defaults and then override at the page level. I understand global “defaults” are now display rules and I can see how that could possibly be more powerful.

    However, now if I want to override a header on a page I have to put a display rule on the header I want AND an exclude rule on the default header. So I have to go two different places just to get a custom header to show up on one page. Plus, the logical place for a page override would be in the page settings themselves the way it used to be, but now all the page level settings aren’t on the page, they are in a different place in the element setup.

    Could someone explain how this is better? I love the new flexibility but it seems like it’s now more complex and duplicate settings just to set a header for a certain page. Given how good GP is and how well thought through it is I’m figuring I must be missing something, but I can’t figure what it is?

    GeneratePress 2.1.3
    GP Premium 1.7.1
    Lead Developer
    Lead Developer

    Hi there,

    It depends on how you look at it. Having headers set on individual pages is simple if you only have a couple headers/pages, but it quickly turns into a nightmare the more pages you have.

    This new way is more complex, but it’s also way more powerful. It has all of the conditions for a specific header in one area, which is way easier than having to go through tons of individual pages.

    I’m not against adding a per-page specific setting for the Header element in the future, but it does turn into an issue the more pages/headers you have.

    For others having issues like this, I wrote an article explaining what happens and why here: https://docs.generatepress.com/article/conflicting-display-rules/

    Really appreciate your feedback! πŸ™‚


    My suggestion would be to put a per-page option back in a future release because I think it’s simpler when you want to do a special page. For example, if you have a site with multiple headers you could end up having to do multiple exclude display rules just to get something to show up on a page. I think it’s a helpful option to have and the display rules on the element can stay the same. It doesn’t require anything to change in the new design there.

    If display rules conflict ideally the most specific one would win. That’s why I was confused why a “default” rule (“all pages”) was overriding a specific rule (just one page). However, given WordPress’ flexibility I could see this becoming a nightmare to get right and slowing down page loads. I do wonder if it should be the newest and not oldest if there is a conflict as the newest is probably the most specific one but depends on how you build.

    Regardless thanks for an incredible theme and great support πŸ™‚

    Lead Developer
    Lead Developer

    The code complexity gets a little crazy when checking which header is most specific. I tried, and failed. I’ll continue to try though, because I agree with that logic πŸ™‚

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