• 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 Sidebar from Front 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 Sidebar from Front Page Only

This topic is: not resolved

Tagged: Genesis child theme, remove sidebar

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 3 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 28, 2013 at 11:03 am #23308
    trbdesign
    Member

    Hi,

    I'm using the Genesis child theme, and I want to remove the sidebar and put a full width slider on the front page only. I found a discussion of this on the forum at http://www.studiopress.community/topic/removing-primary-sidebar but it didn't work when I tried it. I configured the reading settings for a static page site since the person I'm making it for doesn't want to use a blog.  Does anybody have an idea what I'm doing wrong? The site is http://sample3.tonibdesign.com.

    Thanks in advance,

    ToniB

     

     

     

    February 28, 2013 at 1:03 pm #23324
    Brad Dalton
    Participant

    Remove that code and anything else you did to change the home page.

    You can still use the default home page with the widget areas and simply add another widget area which is full width.

    Then you install the Genesis Responsive Slider.

    Add this code to the end of your child themes functions.php file https://gist.github.com/braddalton/5047932


    Tutorials for StudioPress Themes & WooCommerce.

    February 28, 2013 at 3:12 pm #23357
    trbdesign
    Member

    Thanks for your response. I started from scratch with the functions.php file from the genesis-sample theme and when I added your code at the bottom, I got the white screen of death. Does that have anything to do with the 'prose' notation? I'm fine with adding a new widget for a slider, but I still want to remove the sidebar on the front page so that my text in #content will go across the whole page instead of stopping where the sidebar should be.

    Thanks again for your response.

    ToniB

     

    February 28, 2013 at 4:17 pm #23371
    Brad Dalton
    Participant

    Yes that code only works with Prose which i tested and is different to other themes so add this PHP instead:

    genesis_register_sidebar( array(
        'id'			=>   'home-custom',
        'name'			=> __( 'Home Page Slider', 'sample' ),
        'description'	                  => __( 'This is the slider widget area for your homepage.', 'sample' ),
    ) );
    
    add_action( 'genesis_before_content_sidebar_wrap', 'child_before_content');
    function child_before_content() {
    if ( is_home() ) {
    		echo '<div id="home-custom">';
    		dynamic_sidebar( 'home-custom' );
    		echo '</div><!-- end #home-custom -->';
    	}
    
    }
    

    Or grab the raw code from here https://gist.github.com/braddalton/5060622


    Tutorials for StudioPress Themes & WooCommerce.

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

© 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