• 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 Simple Sidebar from home.php

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 › Remove Simple Sidebar from home.php

This topic is: resolved

Tagged: Metro, remove header

  • This topic has 9 replies, 3 voices, and was last updated 12 years ago by optimus203.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • March 29, 2013 at 7:22 am #31904
    xtego
    Member

    I previously removed the primary sidebar from home.php using the following line:

    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );

    This worked great, however, as I continued to work on the site it became clear to me that I was going to have to use different sidebars on different pages.  I added Genesis Simple Sidebars.  This was a perfect solution for what I needed.  However, now the primary sidebar is back on my home page.  Apparently the line above has no bearing when you are using simple sidebars.  What do I need to do to remove the primary sidebar generated by simple sidebars on the homepage only (home.php)?  I am assuming it is another simple one-liner, but i'm having trouble figuring it out.  Can anyone help me out?

    Thanks in advance!

    March 29, 2013 at 7:36 am #31909
    Brad Dalton
    Participant

    You'd need a conditional tag.

    !is_home()
    

    Or try this: http://wordpress.org/extend/plugins/genesis-layout-extras/


    Tutorials for StudioPress Themes.

    March 29, 2013 at 7:42 am #31911
    xtego
    Member

    Genesis Layout Extras would work nicely, however, I need to maintain the secondary sidebar.  There is no option for "Content-Secondary" that I see.

     

    Can you explain where I would use the conditional tag?... (you'll have to forgive me, I'm not much of a coder)

     

    Thanks!

    March 29, 2013 at 7:58 am #31914
    Brad Dalton
    Participant

    You'd need to post this in the plugin forum and David will answer you quickly. Its to do with the plugin.


    Tutorials for StudioPress Themes.

    March 29, 2013 at 8:25 am #31919
    xtego
    Member

    I shouldn't have to use Genesis Layout Extras.  All I have to do is remove the Primary Sidebar from one page.  I've done it before with a single line added to home.php when I was using the default sidebars.  Simple Sidebars obviously has a different name for the action.  I'm trying to figure out what that is.

    I've tried adding the following line to home.php, but to no avail:

    remove_action('genesis_sidebar', 'ss_do_sidebar');

     

    March 29, 2013 at 8:41 am #31922
    xtego
    Member

    I figured it out.  I made changes to genesis-simple-sidebars/plugin.php.  I replaced these lines:

    function ss_sidebars_init() {
         remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
         remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' );
         add_action( 'genesis_sidebar', 'ss_do_sidebar' );
         add_action( 'genesis_sidebar_alt', 'ss_do_sidebar_alt' );

    }

    with this (based off of your original suggestion):

    function ss_sidebars_init() {
         if (!is_home()) {

              remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
              remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' );
              add_action( 'genesis_sidebar', 'ss_do_sidebar' );
              add_action( 'genesis_sidebar_alt', 'ss_do_sidebar_alt' );

              }

    }

    This, in effect, maintains the standard sidebars for the home page, while all other pages get simple sidebars.   Thanks for pointing me in the right direction.

    March 29, 2013 at 8:49 am #31924
    Brad Dalton
    Participant

    You could filter it out on the homepage using a conditional tag in a custom function.

    Just remember to copy that file locally so you can upload it when the plugin updates. Not really best practice.


    Tutorials for StudioPress Themes.

    January 19, 2014 at 8:31 am #85870
    optimus203
    Member

    So is there a custom function solution for this problem? I have the same issue and would like to try to avoid modifying the plugin code.

    January 24, 2014 at 11:57 pm #86922
    Brad Dalton
    Participant

    Try this:

    //* Force full width content layout
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    

    Tutorials for StudioPress Themes.

    January 25, 2014 at 12:48 pm #86982
    optimus203
    Member

    Thanks Brad. That was the filter I found on another site. Works like a charm. Thanks for the time and info.

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 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