Archived topic
Default template & layout settings for custom post types
4 replies · Started by Kim on April 22, 2020
Hey there,
I was wondering if it is possible to change the default template, as well as the default 'Page Builder Container' for custom post types?
I've created a new template for the posts, and it shows correctly as an option, but it'd be great if I could set it as the default for these posts. I've tried renaming the file several times to try and get it to work with WP's template hierarchy, but I can't seem to get it as the default?
Similarly, I'd love to set the default page container width to full screen for all pages, if possible?
Thanks for your help!
Hi there,
A layout element with the desired display rules would be what you are looking for:
https://docs.generatepress.com/article/layout-element-overview/#content-1
https://docs.generatepress.com/article/layout-element-overview/#display-rules
Let me know if this helps :)
Hi Leo,
Thanks for that - it has solved my issue of getting full width for every page.
How about setting the actual default PHP template for certain posts?
I have created a custom post type (Case Study) and have created a post template for them. The new template is available as an option, but I cannot get it to be set at the default, as things stand?
Many thanks
James
Hey Leo,
Not to worry - I figured it out :)
Thanks!
No problem :)