• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

how to remove double sidebars?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › how to remove double sidebars?

This topic is: resolved
  • This topic has 4 replies, 2 voices, and was last updated 11 years, 10 months ago by Matt Mizwicki.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 4, 2014 at 1:27 pm #112986
    design_agency
    Member

    hey all–

    i've got a CPT for my staff page and i've followed this tutorial to get a sidebar in there. it worked perfectly with one exception, i can't seem to get rid of the genesis primary sidebar, even though i've got this in there: remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );

    code below, anyone have any ideas?

    thanks in advance,
    emily

    // Register new sidebar for teachers page
    genesis_register_sidebar( array(
    	'id' => 'teacher-sidebar',
    	'name' => 'Teacher Sidebar',
    	'description' => 'This is the sidebar for the teacher page.',
    ) );
    
    add_action('get_header','da_change_genesis_sidebar');
    function da_change_genesis_sidebar() {
        if ( is_archive('staff')) { 
            remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); 
            add_action( 'genesis_sidebar', 'da_do_sidebar' ); 
        }
    }
    
    //Function to output my custom sidebar
    function da_do_sidebar() {
    	dynamic_sidebar( 'teacher-sidebar' );
    }
    
    http://mariposa.design-agency.org/staff/
    July 7, 2014 at 2:47 pm #113258
    design_agency
    Member

    checking back in on this question as i've been racking my head trying to figure it out. im most confused since i tried unregistering the sidebar as a test in both functions.php file and archive-staff.php to no avail.

    would very much appreciate a bump in the right direction... thanks!

    July 7, 2014 at 6:39 pm #113294
    Matt Mizwicki
    Member

    I've had the same problem multiple times. Do you happen to have Genesis Simple Sidebars on the site? Or maybe Genesis Connect for WooCommerce?

    If so, they add their own Primary Sidebar with a different name. They can be removed like this...

    remove_action( 'genesis_sidebar', 'ss_do_sidebar', 100 ); // remove the Genesis simple sidebars sidebar
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar', 100 ); //remove the default genesis sidebar
    remove_action( 'genesis_sidebar', 'gencwooc_ss_do_sidebar' ); //remove the Genesis Connect for Woo Sidebar

    If that's not it, try keeping
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    and then deactivate plugins one at a time until sidebar is gone. When you find out which plugin is causing the issue, you should be able to google how to remove the primary sidebar specific to that plugin.

    July 8, 2014 at 11:24 am #113437
    design_agency
    Member

    ah! thanks mm0233, you totally put me on the right track. it was simple sidebars for sure, it just took me a while to figure out where to hook the fix. all is working as it should!

    July 8, 2014 at 12:40 pm #113448
    Matt Mizwicki
    Member

    The same issue had me confused for weeks when it first happened!

    Glad it worked out for you!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble