- This topic has 9 replies, 4 voices, and was last updated 5 months, 2 weeks ago by Tom.
April 3, 2020 at 12:15 am #1224470Vera
What I’m hoping (desperately) for is to have distinct headers for each of the main sections (parent pages) of my site without having to assign every single page on my site to a header element. This will become even more unwieldy when new pages are added down the line.
I need the simplest possible setup for the web site owner. He doesn’t want to have to use any part of WordPress except for Pages, Posts, and the Media Library. So I’d like to predefine the web site sections (i.e., parent pages) with appropriate headers so he can just create pages under those sections and have the correct header element display automatically without him having to go into the elements settings.
If it can be done with “parent-like” settings, I have not been able to figure out what they are called. I hope it exists and that I’m just looking for the wrong name!
I would also like it to be possible for a parent header element to be overridden if I assign a different header element to any of its child pages. Then the child’s header element should apply to it and all it’s children in place of the original parent’s header element — unless one of the children has a different header assigned, and so on… Something this effect anyway.
I hope this makes sense!
Thank you.Usual environment: 9.7” iPad Pro, iOS 13.4+
Desktop: Mac OS 10.15.4April 3, 2020 at 8:21 am #1225131LeoStaffCustomer Support
Would something like this help?
https://generatepress.com/forums/topic/display-elements-via-filters/#post-766340April 3, 2020 at 10:15 am #1225335Vera
Thank you once again for the quick replies. It’s been such a relief to feel I can count on these because I have a looming deadline!
So I assume I would create a separate Snippet for each parent page and change the ancestor page ID in the snippet code (45458 in example).
I assume I also set up a header element. If so…
- How do I set up Display Rules in each?
- How do I tell the snippet which header element to display?
- Can I make it so there is a default header for all pages except those where I have already set up display rules AND, if I have a child that’s already following a parent’s display override, can I assign a parent rule to it that overrides it’s parent’s rules?
If the answer to #3 is no, I may need to pass on this solution and just settle for a single header throughout for now as this may be too difficult for me to maintain — especially remembering the procedure after a few weeks or months. Aside from that, the more plugins I have to rely on, the more tricky it gets to keep all the updates compatible.
It would be more user-friendly for non-coders like me if there was no need for a snippet and you could instead manage it all within element settings — like a display rule where you assign a parent page to control the display for all its child pages.
Is there a specific way I should submit feature requests?Usual environment: 9.7” iPad Pro, iOS 13.4+
Desktop: Mac OS 10.15.4April 3, 2020 at 5:27 pm #1225697TomLead DeveloperLead Developer
I can’t think of a way to make #3 work with the current set up.
I wonder if it would simplify things if you added categories to pages?: https://wordpress.org/plugins/add-category-to-pages/
That way you could add pages to specific categories, then assign the Header Element to those categories instead of a bunch of different pages.April 3, 2020 at 7:26 pm #1225762Vera
I saw that option and it would be perfect except I don’t see where I can assign categories to pages — only posts. I’m not looking to put custom headers on blog posts. Is there an WP setting I missed that would allow that? I hope! 🤞🏼Usual environment: 9.7” iPad Pro, iOS 13.4+
Desktop: Mac OS 10.15.4April 4, 2020 at 3:31 am #1226017DavidStaffCustomer Support
Tom provided the link to the plugin you’ll need to add Categories to pages:April 4, 2020 at 8:28 am #1226407Vera
That’s great! But the plugin hasn’t been updated in 6 months and says it’s untested with my version of WordPress. How likely is that to be a problem? Is there a “best practices” procedure users can follow to test a plugin in a staging setup?
I would still like to add Parent-Child pages as a feature request for Element display rule options. This way I won’t have to be reliant on as many plugins that may stop being supported. Hopefully WP will also add categories for pages as a standard feature.
Thank you!Usual environment: 9.7” iPad Pro, iOS 13.4+
Desktop: Mac OS 10.15.4April 4, 2020 at 11:11 am #1226587LeoStaffCustomer SupportApril 4, 2020 at 2:06 pm #1226756Vera
Okay, good. There have been a few updates to WP in that short time so I worried.Usual environment: 9.7” iPad Pro, iOS 13.4+
Desktop: Mac OS 10.15.4April 4, 2020 at 5:33 pm #1226836
- You must be logged in to reply to this topic.