Can I used a layout to display my post type differently? My pages and block posts have sidebars which I want to suppress when I'm displaying content from custom post types.
My assumption was that content templates display what appear in the page/blog content sections, but the layouts affect the whole page look, but I might be wrong!
Given that you are using our Blocks plugin then you won't be able to use our Layouts plugin at the same time.
Also our Layouts plugin wouldn't be able to remove the sidebar as your theme's template is what is responsible for this. Even if you build out your page with our Layouts plugin you will still need to use your theme to disable the sidebar.
Ah! In which case, is there any way I can make a custom post type always select a specific theme template?
I've created a new theme template which I want some of my post types to use. It appears in a "Post Attributes" box in the editor, but defaults to the standard:
If not, is there a hook I can use to flip it with some code?
This will require a little coding and copying and pasting as the only way I know to make the Posts in a Post Type default to a template from the theme is to create a template and give it the filename of the Post Type slug.
Normally your Post type templates are named as single.php . If you want this template file to default to another a custom post type you will create a copy of that single.php file and name it single-{cpt_slug}.php .
If I had a Post Type called Manufacturers and the slug is manufacturers then the template name would be single-manufacturers.php