Learn how to fix the right sidebar structure as the default layout in a Genesis Framework child theme by 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 sidebar on the right by default?
With Genesis you can do this easily.
Code to set the content-sidebar structure as the predefined layout
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 in the format of the sidebar on the right .
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 sidebar on the left of the content as the default option.
Conclusions
Use the code above to get the sidebar design to the right of the content as default in the type of entry or page you want within any Genesis child theme.
Any questions? I read you 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. 😉