- This topic has 3 replies, 2 voices, and was last updated 3 years, 9 months ago by Tom.
August 17, 2018 at 7:56 pm #652358Samuel
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.3GP Premium 1.7.1August 17, 2018 at 8:44 pm #652368TomLead DeveloperLead Developer
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! 🙂August 18, 2018 at 10:47 am #652897Samuel
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 🙂August 18, 2018 at 7:00 pm #653133TomLead DeveloperLead 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 🙂
- You must be logged in to reply to this topic.