I am using roots and am trying to decide if I am using the custom base functionality properly.
I have a base-front-page.php for the home page and then for all the subpages I have modified the base.php file to handle all of the sub-pages layout.
Then for any custom templates (which have different API calls in each) I am creating files in the templates folder and naming them: content-newfilename.php. These all show up as expected in Wordpress when creating a new page in the template drop down.
What I am looking to do is have all of these custom templates inherit a layout that is different than the layout in base.php.
I have read the Theme Wrapper and Roots 101 multiple times, but just can’t seem to grasp how to best accomplish this.
If you’re using a custom page template like page-custom.php and calling content-custom.php then you can simply create base-page-custom.php and your new base will take effect.
I also have a file in the templates folder named content-newsroom.php. I am getting the proper content from this file, but for whatever reason I am still seeing the base.php instead of base-newsroom.php - (I tested this by removing the code from the base-newsroom.php that brings in the right sidebar, but the right sidebar is still showing up, which means it is ignoring my custom base file and using the base.php).
By just using base-content-newsroom.php I believe you run the risk of not including your page header. As in my example above, it’s best practices with Roots to include “page” in your base filename, so consider using a base template with the filename base-page-newsroom.php.