im just wondering how the base.php determines whether to use a sidebar or not.
i made a custom template for my home page, from the custom template file. - my home page was full width. using the col-lg-12 taken from the header file
i then created an about page template from the same custom template. and this page is taking a column of 8 and then one of 4 for the sidebar.
Ok, i understand that if the page has a sidebar it wraps it in an 8 col, or otherwise a 12 col,
but if I used the same template to create two separate page templates, why does one have a sidebar and one doesn’t? is it because the home page automatically doesn’t have a sidebar?
sorry to sound so dense. I’m learning more daily, but i do find code a struggle. Im trying to study php via Lynda, but I am finding a lot of the explanations of things are going over my head as they arent explained in context. i know eventually things will click but at the moment it is literally asking for help speaking another language.
Whether the sidebar is displayed or not is controlled by the settings in lib/config.php.
The is_front_page check in the first array will prevent the home page from using a sidebar. If you want to exclude the sidebar from displaying when using your custom template, you need to add the template filename to the second array:
Ok I get it, thanks @Foxaii - the lots of little parts of templates Im just getting to grip with, so if i want to include an image on the page that goes full width, and then have content/sidebar underneath, do i exclude the sidebar and then get the sidebar on the page template? if that makes sense,
* Page template checks (via is_page_template())
* Any of these page templates that return true won't show the sidebar
*/
array(
'template-custom.php',
'template-about.php',
)
);
I added 'template-about.php’
not sure if I have put the template in the array correctly?