Learn how to set the design with the sidebar on the left as the default layout in a Genesis Framework child theme using code.
Genesis offers 6 different template models depending on how you combine the content with the primary and secondary sidebars.
In addition, this platform allows you to choose which format to use by default from the WordPress customizer.
However, you may find it useful to select a different layout depending on the type of entry.
For example, do you want your pages and portfolio to have a full width layout while your blog posts show a left sidebar by default?
With Genesis you can do this easily.
Code to set sidebar-content layout as default
Remember to enter the following snippet at the end of the page template you want it to work (single.php, single-portfolio.php, file.php… ) before genesis():
To see this and another 1097 code snippets of this website, login or subscribe here.
When you place this code in the template, each time you create a new entry or page it will be displayed with the sidebar on the left .
This makes it easier for the client to select the right layout for each type of entry.
If you prefer, you can also choose the layouts with 2 sidebars as a predefined option.
Conclusions
Use the code above to get the layout design with the sidebar to the left of the content to be used by default in the type of entry or page you want within any Genesis child theme.
Any questions? Let me know in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉