I am trying to: create a page and also custom post types with custom header and footer (already created in the parent layout of a child page). When we create a new page and apply the child layout, the header and footer of the parent layout appear in the page content box and not overwrite the site's header and footer. How can we create pages and custom posts that shows only header and footer of the parent layout?
The theme we are working on is a specific theme and does not seem to have integration with Types.
Link to a page where the issue can be seen: hidden link
I expected to see: the page / custom post with header and footer that override the site's main header and footer
Instead, I got: the page shows the parent header and footer in the content area and not instead of the main header and footer of the wensite.
Hi, this is how Layouts works with most themes - the theme controls the header and footer, and Layouts controls the main content area. Most people are usually satisfied with the overall site structure provided by their theme, and they want to use Layouts to control the main content area only. If you want to control the entire site, then you can use a fully-integrated theme like Toolset Starter, or you can modify your own theme to work in the Layouts framework. Toolset Starter is probably the easiest option, since it's already coded and available here in your Account Downloads area.
If you want to create your own fully-integrated theme, we have some documentation available here:
https://toolset.com/documentation/user-guides/develop-layouts-based-themes/
Hi Christian,
I resolved the issue by creating an empty .php template and adding the parent/child layout on it. Now the page looks ok but ti found another issue in that page.
When we create the layout rows, Toolset adds a default "row" class that is not editable (see attached screenshot).
Is there a way to remove that "row" class because it interferes with other CSS of the main template of the website?
Thanks in advance for your help.
Franco
The "row" class is part of the core grid system used by Layouts, so removing it will most likely cause significant problems. If you plan to work around that with your own CSS, you could probably use jQuery to remove that class when the page loads, something like:
jQuery(document).ready(function(){
jQuery('.ddl-full-width-row.row.header-row').removeClass('row');
});
Hi Christian, thanks for your help.
We now need to apply the same parent template to a custom post instead of a page but the post still keeps the single.php template so we need to create a clone of that and tell the custom post type to refer to that clone, but how can that be achieved?
The custom post types are jerarchical posts and in the post attributes we checked "page" (see screenshot) but in the custom post type content screen we cannot select a differente template.
Any help on that?
Thanks
Franco
Check out the WordPress Template Hierarchy documentation for single Custom Post templates:
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post:
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
The file name format is single-cptslug.php