There’s many ways to change the layout options on posts, pages and archives. The only problem is, you either have to change them manually, one by one using the Layout Settings on all edit post/page screens, or change them site wide using the Genesis > Theme Settings > Default Layout settings.
What if you want to change them only on single posts or only on pages. What if you want to change the layout on all archive pages for a specific category or all archives?
In this tutorial, i’ll provide you with custom functions which you can simple paste at the end of your child themes functions.php file using a text editor like Notepad++.
You can also change the conditional tag and the layout option using these settings.
Full Width Layout On Single Posts
Full Width Layout On All Archives
Includes category, tag, author and date based archive pages.
Full Width Layout On All Pages
Full Width Layout On All Posts In A Category
Find your category i.d and replace 007 or use the category name or category-slug instead.
1. This code won’t override files like front-page.php, home.php, page_landing.php, single-portfolio.php, archive-portfolio.php and other templates which include code to force a specific layout in the template. Simply change the code in the template which changes the layout to do that.
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
2. Also, if you install a plugin which changes the layouts, it may override any code you use to do the same thing.
3. Another reason the code may not do what you want it to is if it contains the wrong conditional tag.
Example: The code containing the
is_single() conditional tag only changes the layout on single posts.
If you prefer plugins to code, you’re in luck.
The Genesis Layout Extra plugin enables you to:
Modify the default layouts for homepage, singular, archive, attachment, search, 404 and even bbPress via the Genesis theme settings page.Subscribe for new Genesis Tutorials