I have set up a custom template for my Post Type using the beaver builder integration but need to change the default php file it uses to a custom php file i created in my child-theme.
By default when you use the integration for Beaver Builder it uses the single.php template file to create the custom template. I dont want this because it adds the sidebar and is not full width. I could disable the sidebar in the template customizer, but this would also disable it for the blog posts and all other templates that use the single.php file.
The solution for me would be to copy the page.php file which is what beaver builder uses for the page layout (using no sidebar and full width) and use this file as the basis that the views uses but there seems to be no option for this within the Types/views interface.
How can i make this change?
Any help is greatly appreciated!
Beaver Builder Integration lets you edit Content Templates with the Plugin.
Content Templates will replace the_content() part of your Template.
The theme determines what template is used.
This follows the WordPress template hierarchy:
https://developer.wordpress.org/themes/basics/template-hierarchy/
So, if you want a Custom PHP Template to use the Content Template edited with Beaver Builder, you need to create a single-{post-type}-{slug}.php or single-{post-type}.php File:
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
There you need to call at least the_content() and then this should apply the Content Template edited with Beaver Builder.
Oh so if my post type slug is "chapters" creating a page-chapters.php file wont work.
I would need rename that file single-chapters.php, is this correct?
You need to create a single-{post-type}-{slug}.php or single-{post-type}.php File:
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
In your case, either single-chapters.php or single-chapters-post_slug.php