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.
- content-sidebar
- sidebar-content
- content-sidebar-sidebar
- sidebar-sidebar-content
- sidebar-content-sidebar
- full-width-content
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.
Not Working?
- 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' );
- Also, if you install a plugin which changes the layouts, it may override any code you use to do the same thing.
-
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.
Layout Plugins
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.
I’m kind of having the opposite problem as addressed here. My site is pretty much all full-width, but my blog page is too wide, there are too many words on each line making it hard to read. I have other pages on my site that use posts archives and they look fine, so I don’t want to change the width of archive pages, just posts with the category called “blog” and make them less wide. Is there any way to accomplish this?
Hello Angie
You shouldn’t create a category named blog as it may cause problems.
I would change it to news or something like that then you can use the code in this post.
Would love to create a single post layout like this http://www.thecoveteur.com/13-best-2013-chiara-ferragni-part-two/
an ideas? So full width at the top with sidebar after post content.
Can be done if you know how to code a custom page template http://wpsites.net/web-design/flexible-responsive-widgets-template-for-genesis/
Amazing! Have been searching for hours but that looks like a good starting point. I know a fair about genesis so should be able to work it out from there.
Thanks for such a speedy reply 😀 and Happy New Year!
You could also use a custom post type portfolio style archive which is 3 columns width with or without a sidebar http://wpsites.net/web-design/add-portfolio-page-to-modern-portfolio-pro-theme/
Not as flexible but enables you to also add custom taxonomy types.