• 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 PRIMARY Sidebar from my homepage

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 PRIMARY Sidebar from my homepage

This topic is: resolved
  • This topic has 1 reply, 1 voice, and was last updated 9 years, 7 months ago by pixelpaper.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 4, 2013 at 10:27 am #49205
    pixelpaper
    Member

    I am trying to make my own child theme, using magazine as a guide.

    I want my primary sidebar removed and replaced on the homepage with a custom widget/sidebar

    I am able to add the new widget area, but can't remove the default...
    (I did it on a dummy site, but can't get it to work on my working site)...
    here is the code I'm using...

    (this is in the "home.php" file.

    // Swap sidebar on homepage
    add_action('get_header','calvary_change_genesis_sidebar');
    function calvary_change_genesis_sidebar() {
    if ( is_home('home')) {
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); //remove the default genesis sidebar
    add_action( 'genesis_sidebar', 'calvary_do_sidebar' ); //add an action hook to call the function for my custom sidebar
    }
    }

    // Output sidebar with the id 'home-sidebar'
    function calvary_do_sidebar() {
    genesis_widget_area( 'home-sidebar' );
    }

    any help would be greatly appreciated.
    Kim

    July 4, 2013 at 3:23 pm #49240
    pixelpaper
    Member

    changed (is_home('home')) to
    is_home('home')

    dont' know why the other worked on another site... but i'm good.
    Kim

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘remove PRIMARY Sidebar from my homepage’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 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