Create my own full-width template
-
So having managed to make my template with the add-ons (the bread crumbs & last modified) where I want them, I realised I didn’t want the sidebar in the pages using this template.
The code in my custom
manual.php
is identical to that in the includedfull-width.php
intiny-framework/page-templates
apart from the two additional items.To investigate I created a full width page with the standard template and another one with mine and compared the generated HTML (notepad++ is a wonderful tool).
A clear significant difference is that ‘full-width’ is included in the list of classes for the
<body>
tag in the standard one but not mine.Not sure if it’s significant that the mine has
page
where the standard one haspage-template-page-templatesfull-width-php
– again this is in the classes for<body
.After some greping, it looks like the missing class ‘full-width’ is set by tiny-framework/inc/semantics.php:
157 // Using a full-width layout, when no active widgets in the sidebar or full-width template. 158 if ( ! is_active_sidebar( 'sidebar-1' ) 159 || is_page_template( 'page-templates/full-width.php' ) 160 || is_attachment() ) { 161 $classes[] = 'full-width';
Now obviously I don’t want to change that file – my own template is in a child theme.
I also really don’t want to copy it all to my child theme either unless that’s the only way to fix this.
Is there a simple way to fix this in or for my custom page template?
- This topic was modified 4 years, 3 months ago by .
- This topic was modified 4 years, 3 months ago by .
- This topic was modified 4 years, 3 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Create my own full-width template’ is closed to new replies.