remove PRIMARY Sidebar from my homepage

Community Forums Forums General Discussion remove PRIMARY Sidebar from my homepage

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  pixelpaper 9 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #49205

    pixelpaper
    Participant
    Post count: 16

    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

    #49240

    pixelpaper
    Participant
    Post count: 16

    changed (is_home(‘home’)) to
    is_home(‘home’)

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

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘remove PRIMARY Sidebar from my homepage’ is closed to new replies.