Community Forums › Forums › Design Tips and Tricks › Remove Sidebar from Front Page Only
Tagged: Genesis child theme, remove sidebar
This topic contains 3 replies, has 2 voices, and was last updated by braddalton 2 months, 3 weeks ago.
-
AuthorPosts
-
February 28, 2013 at 11:03 am #23308
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
February 28, 2013 at 1:03 pm #23324Remove 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
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.February 28, 2013 at 3:12 pm #23357Thanks 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 #23371Yes 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
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered. -
AuthorPosts
You must be logged in to reply to this topic.