• 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

Remove Sidebars Via Action Hook

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 › General Discussion › Remove Sidebars Via Action Hook

This topic is: not resolved
  • This topic has 3 replies, 3 voices, and was last updated 11 years, 11 months ago by craiggrella.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 4, 2013 at 10:57 pm #77134
    gerardoritchey
    Member

    I'm trying to figure out how to remove a sidebar via an action hook

    I'm currently using
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar', 10 );

    and it's not working.

    I've stuck that code snippet in a template file, in my plugin file, and my functions.php file and it simply does not work.

    Obviously I'm missing something.

    I'm using Genesis v 2.01 and the Agency Pro child theme in HTML5 mode.

    I do have Genesis Simple Sidebars installed.

    December 4, 2013 at 11:25 pm #77138
    gerardoritchey
    Member

    I figured it out.

    Genesis Simple Sidebars unhooks the regular Genesis genesis_do_sidebar action and replaces it with it's own.

    To dynamically remove a sidebar when Genesis Simple Sidebars is installed you have do it like this:

    
    add_action( 'get_header', 'msm_force_course_sidebar' );
    function msm_force_course_sidebar(){    
        remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
    }
    
    March 6, 2014 at 7:36 pm #93785
    morktron
    Member

    Wow, thanks so much for posting this, I never would have worked that one out myself. I've got my custom widget area working now, thanks to you 🙂

    July 18, 2014 at 2:23 pm #114832
    craiggrella
    Member

    It looks as if the woo genesis connector also takes control of sidebars such that this code doesn't work.
    Anyone have a solution there?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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