Archived topic
Page Layout settings based on slug xyz? eg. /xyz/my-post has no footer?
1 reply · Started by shpr on July 8, 2019
Is it possible to have default settings based on slugs?
eg. so all posts with /xyx/ have;
- no sidebars
- disabled footer
- disabled primary navigation
Also - if this is possible....is there also a way of setting the page background color (or other css) of posts containing /xyz/ suug?
Thanks
Hi there,
Try creating a layout element with the desired result:
https://docs.generatepress.com/article/layout-element-overview/
Then use this filter:
https://docs.generatepress.com/article/generate_layout_element_display/
And this conditional tag:
https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page
Let me know if this helps :)