Learn how to apply the full width structure as the default layout in a Genesis Framework child theme using one line of 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 entry type.
For example, do you want your blog entries to have a sidebar on the right, but your pages and portfolio to show a full width design?
With Genesis you can do this easily.
Snippet to set full width as a predefined layout
In this case, you must add the following fragment to the end of the page template on which you want it to work (single.php, single-portfolio.php, archive.php…) before genesis():
When you place this code in the template, each time you create a new entry or page it will be displayed in full width format.
This makes it easier for the client, avoiding the need to be vigilant in selecting the right layout for each type of entry.
If you prefer, you can also choose the layouts with a sidebar to the right of the content as the default option.
Use the code above to get the full width design as default in the type of entry or page you want within any Genesis child theme.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂