Change Layout On Posts, Pages & Archives in Genesis

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?

single post & page layout options

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?

  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' );
  1. Also, if you install a plugin which changes the layouts, it may override any code you use to do the same thing.

  2. 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.


Comments

8 responses to “Change Layout On Posts, Pages & Archives in Genesis”

  1. […] 9. Activación de un diseño por defecto para los artículos individuales del sitio web. Este código sirve para que todos los artículos de este sitio web (tanto entradas como páginas) adquieran el diseño con barra lateral a la derecha, aun a pesar de que el diseño por defecto del tema sea sin barras laterales. El snippet se ha adaptado a partir de Change Layout On Posts, Pages & Archives in Genesis. […]

  2. […] ‘full_width_layout_single_posts’ ); /** * @author Brad Dalton * @link http://wpsites.net/web-design/change-layout-genesis/ */ function full_width_layout_single_posts( $opt ) { if ( is_single() ) { $opt = […]

  3. 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?

    1. Brad Dalton Avatar
      Brad Dalton

      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.

  4. 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.

    1. Brad Dalton Avatar
      Brad Dalton

      Can be done if you know how to code a custom page template http://wpsites.net/web-design/flexible-responsive-widgets-template-for-genesis/

      1. 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!

        1. Brad Dalton Avatar
          Brad Dalton

          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.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.