Archived topic
Create Template Page With All Elements
3 replies · Started by Darryl on October 16, 2022
Hey there..
very, very long time since I have had a chance to play around on the front-end. need ask a fairly basic question: How can I create a reusable page layout, my desired elements? For example,
Page Layout 1 has sidebars A & B
Page Layout 2 has sidebars C & D
Then for each Page Layout 1 I might make 20 pages and for Page Layout 2, I might make 50 pages..
Basically, I am trying to avoid using the Elements locations function for every page that I create... gets tedious...
Thanks
Hi there,
one method i use is a custom taxonomy whose sole purpose is to create custom display rules that can be added to posts or pages. see here for that method:
https://generatepress.com/forums/topic/display-rules-to-target-page-options/#post-2366988
That worked like a charm... I clicked through the GUI for an hour... never would've figured out I need a php snippet to achieve my goal... Is there GP - Snippet Library? And Is there any further documentation on using this snippet.. I figured it out, but it is a little counter-intuitive in the beginning...
Hi Darryl,
The snippet filter recommended by David isn't a GP filter. It's a WordPress core filter. You can find the documentation here: https://developer.wordpress.org/reference/hooks/wp_sitemaps_taxonomies/
As for GeneratePress, here's the documentation for various Filter and Action hooks: https://docs.generatepress.com/collection/hooks/