Community Forums › Forums › Design Tips and Tricks › Removing Primary Sidebar
This topic contains 4 replies, has 2 voices, and was last updated by Ozzy 5 months, 2 weeks ago.
-
AuthorPosts
-
November 30, 2012 at 3:46 pm #2631
My site is amadorvalleyhs.org
I sought out help to remove the primary sidebar from my site. And was fortunate to get this bit of code which I placed in the functions.php file.
remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ );
It works out well on the home page but does not do so well on other pages where I am also using the secondary sidebar:
Eg: http://www.amadorvalleyhs.org/student-life/athletics
There is extra space where the primary sidebar should be, preventing the test in the main area from moving over (filling in the area where the primary sidebar was.)
Any help to get the text to move over would be appreciated! Erik
November 30, 2012 at 3:58 pm #2638if you’re just wanting to remove the sidebar from the home page, you could either force a full width page on the home page or do put something like this in your functions.php file:
// remove sidebar from home
add_action ('genesis_before_loop', 'remove_sidebar_home');
function remove_sidebar_home() {
if (is_home() ) {
remove_action ('genesis_after_content','genesis_get_sidebar');
}
}
Ozzy Rodriguez | Twitter | Google+ | Facebook
November 30, 2012 at 4:28 pm #2661Hi–I don’t need for the home. The code I have in place is working fine for the home. The problem I have is with the subpages.
November 30, 2012 at 4:48 pm #2671For example:
http://www.amadorvalleyhs.org/student-life/athletics
The text does not go over all the way even though the sidebar is not visible.
November 30, 2012 at 5:06 pm #2680have you tired going to Genesis > Theme Settings and changing the default layout to full width?
Ozzy Rodriguez | Twitter | Google+ | Facebook
-
AuthorPosts
You must be logged in to reply to this topic.