Remove Genesis Layout Options

Genesis provides six different layout options with one, two, or no sidebars.

Most of the sites we build either have no sidebar or a single sidebar layout. We remove the unused layouts to keep the backend interface as simple as possible.

Here are two different ways to remove unused layouts.

Remove specific layouts

You can use the genesis_unregister_layout() function to remove a single layout. If the only layouts you want to keep are Full Width Content and Content Sidebar, you can add this to your theme:

// Remove unused sidebar
unregister_sidebar( 'sidebar-alt' );

// Remove unused layouts
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content' );

Remove all layout options

There’s no reason to display the Layout Settings when there aren’t multiple layouts to choose from. The following code:

  • Removes both sidebars
  • Removes all layouts except ‘full-width-content’
  • Removes the Layout Options metabox from the Edit Post / Page screen
  • Removes the Layout Options metabox from Genesis Archive Settings
// Remove unused sidebars
unregister_sidebar( 'sidebar' );
unregister_sidebar( 'sidebar-alt' );

// Remove layouts
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content' );
genesis_unregister_layout( 'content-sidebar' );

// Remove layout metaboxes
remove_theme_support( 'genesis-inpost-layouts' );
remove_theme_support( 'genesis-archive-layouts' );

// Use full width layout 
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

Genesis Theme Framework WordPress Development

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk

Reader Interactions

Comments

  1. Phil says

    Thanks again for another great bit of Genesis goodness.
    in theory, at least: I’m probably doing something wrong, because when I remove the Genesis sidebars and all layouts as described above, suddenly the two standard sidebars/widget aeras stubbornly start showing up at the bottom of all my posts and pages.

    They’re not in active/visible the Widgets screen, so they simply show the default “Primary Sidebar Widget Area This is the Primary Sidebar Widget Area. You can add content …” text.

    Doing it the old-fashioned way of removing the sidebars and all sidebar layouts makes them disappear again; somehow the add_filter( ‘genesis_get_layouts’, ‘__return_empty_array’ ); bit makes Genesis act weirdly here.

    • Bill Erickson says

      Sorry about that, you’re right. Genesis loads the default widget area content when no layout is specified.

      I’ve updated the code to use the “old fashioned way” to prevent this issue.

Leave A Reply