• 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 Edcuation Home Page only

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 Primary Sidebar from Edcuation Home Page only

This topic is: resolved

Tagged: education, home, primary sidebar, remove sidebar

  • This topic has 12 replies, 4 voices, and was last updated 11 years, 11 months ago by jbculp.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • March 4, 2013 at 1:16 pm #24092
    xtego
    Member

    Hello.  I am using the Education child theme using the latest posts option for the home page.  What I need to be able to do is remove/hide the  primary sidebar widget from the Home page only and make the blog area on the homepage full width.  I still need all of the other widgets on the home page.  (Secondary, intro, slider, featured, etc.)  And, I still need to the primary sidebar to show on all other pages.  I'm hoping this is easier than I am making it out to be, but I just can't seem to figure it out.

    Thanks in advance!

    March 4, 2013 at 1:45 pm #24098
    Kraft
    Member

    It is pretty easy, I believe.

    Does adding this code to your home.php file do it for you?

    https://gist.github.com/kraftbj/5084917


    Brandon Kraft
    Volunteer
    Blog | Twitter
    Genesis eNews Extended Support

    March 4, 2013 at 2:53 pm #24119
    xtego
    Member

    Thanks for the response.  That does force full width, however, it also removes the secondary sidebar which i still need.  Really i just need to hide the Primary sidebar from the home page and extend the blog text over the area where the primary sidebar is.

    To maybe better explain what I am trying to do... if you look at the education theme demo.  On the demo homepage, everything above the "join our newsletter" orange ribbon should stay the same.  Below the ribbon, I want to hide the primary sidebar (Search, tweets, profile, etc) and use that whole area for the blog entries.

    I'm thinking this will be more of a CSS change perhaps?

     

    (Also, I can't switch the location of the primary and secondary sidebars because they are relied on on other pages.  )

    March 4, 2013 at 3:20 pm #24124
    Kraft
    Member

    Ah, I'm following you. I'd do both php and css... just hiding the primary sidebar would still require the server to produce it and your user to download it.

    In style.css, try adding a:
    body.home #content {
    width: 880px;
    }

    (may need width: 880px !important;)

    In home.php, add remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); before genesis();

    That remove the sidebar and then increases the content space to fill the gap.


    Brandon Kraft
    Volunteer
    Blog | Twitter
    Genesis eNews Extended Support

    March 4, 2013 at 5:01 pm #24154
    xtego
    Member

    Dude!  That's worked perfectly.  Exactly what I was looking for.  Thank you!

    March 6, 2013 at 11:51 am #24568
    Turnlane
    Member

    I am working on http://www.kindreddfw.com which is using the Education theme.  I am trying to remove the blog and the primary sidebar.  I was able to remove the blog roll, but am not able to remove the primary sidebar.

    I added to the home.php:

    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );

    but it didn't do the trick.  Any advice?

    Thanks, Julie

    March 12, 2013 at 12:06 am #25602
    Kraft
    Member

    Hi Julie,

    My apologies for the delayed response. It's usually best to start a new thread when posting an issue—this one was a bit "buried" since the original poster's issue was resolved.

    It looks like you were able to resolve this issue? If you're still having issue, please let me know.

    Cheers!


    Brandon Kraft
    Volunteer
    Blog | Twitter
    Genesis eNews Extended Support

    March 20, 2013 at 7:57 am #29681
    Turnlane
    Member

    Brandon,

    I have not been able to resolve the issue yet.  Please see http://www.kindreddfw.com.  I am trying to remove the blog completely.  Do I need to start a new thread?

    Thanks,

    Julie

    March 20, 2013 at 9:20 am #29706
    Kraft
    Member

    I'm sorry—I don't understand what you're trying to remove.

    It looks to me that there isn't a blog on that site.


    Brandon Kraft
    Volunteer
    Blog | Twitter
    Genesis eNews Extended Support

    March 22, 2013 at 8:05 am #30429
    Turnlane
    Member

    Kraft,

    I am sorry for the confusion.  I am working on http://www.kindreddfw.com which is using the Education theme.  I am trying to remove the blog and the primary sidebar.  I was able to remove the blog roll, but am not able to remove the primary sidebar.

    I added to the home.php:

    remove_action( ‘genesis_sidebar’, ‘genesis_do_sidebar’ );

    but it didn’t do the trick.  Any advice?

    Thanks, Julie

    March 22, 2013 at 8:39 am #30434
    Kraft
    Member

    Julie,

    That code is working for me, though, depending on where you copied it from, it may be malformatted. Single-quotes must be the traditional single-quotes and not the "fancy" counterpart. See here:

    https://gist.github.com/kraftbj/5221737

    Using the first code, I can remove it from a stock version of Education without issue (ref: http://sp.brandonkraft.net as of now).

    Thanks,

    Brandon


    Brandon Kraft
    Volunteer
    Blog | Twitter
    Genesis eNews Extended Support

    March 22, 2013 at 10:00 am #30452
    Turnlane
    Member

    Brandon,

    I copied the code from https://gist.github.com/kraftbj/5221737 and replaced my existing code, but I still got the same result.  The primary sidebar is still there.

    Let me know if you think of anything else I should try.

    Thanks,  Julie

    July 13, 2013 at 12:32 pm #50559
    jbculp
    Participant

    Hi all. I have two other unanwsered posts on this topic but now with your help and the help of info on a blog, I've got it.

    Summary:
    Remove primary sidebar from Education Theme Home page only and then widen the content frame to fill the open space.

    Since I was able to make other pages full-width, I didn't need to do this elsewhere and I needed to retain the primary sidebar on the blog page. Had I needed the secondary-sidebar I would have followed the tutorials listed below to do a custom body class for other pages thereby allowing me to eliminate the primary sidebar where I needed.

    Full Solution in Education Theme:

    Add this to home.php
    /** Remove default sidebar */
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );

    With the help of Kraft in this thread and comments on this blog ( http://www.carriedils.com/genesis-theme-tutorial-primary-sidebar/ ) it all came together.

    Once sidebar is gone from home page, the content frame is too narrow. I wanted it to fill the full frame so I added this to the CSS:

    #home-featured ~ #content {width: 90%;}

    According to Chris Coyier's website on CSS-Tricks, this selector allows for styling the content frame if it is preceded by the home-featured element. See full article at: http://css-tricks.com/child-and-sibling-selectors/.

    Yahoo!

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

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