Remove Sidebar from Front Page Only

Community Forums Forums Design Tips and Tricks Remove Sidebar from Front Page Only

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  braddalton 1 year, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23308

    trbdesign
    Participant
    Post count: 16

    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.com/forums/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

     

     

     

    #23324

    braddalton
    Participant
    Post count: 10577

    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


    #23357

    trbdesign
    Participant
    Post count: 16

    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

     

    #23371

    braddalton
    Participant
    Post count: 10577

    Yes that code only works with Prose which i tested and is different to other themes so add this PHP instead:
    [php]
    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 –>';
    }

    }
    [/php]

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


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

You must be logged in to reply to this topic.