Hi, I would like to remove secondary sidebar only on a certain page.
Is there a way to do this?
Thanks for all.
Davide
Hi, I would like to remove secondary sidebar only on a certain page.
Is there a way to do this?
Thanks for all.
Davide
Take a look at Chris post here: http://www.wupperpiraten.de/2009/03/how-to-remove-the-sidebar-from-a-certain-page/
It should help you.
Thanks for your response.
I've already seen that solution but I want to remove only the secondary div in the sidebar.
Is there a way to remove only the secondary div?
Thanks
Well, may be this other forum post clarify: http://themeshaper.com/forums/topic/using-multiple-stylesheets-in-a-child-theme#post-1712.
You could use this approach to set your secondary bar hidden:
#secondary{display:none;}
And notice that you don't have to include a new style sheet, just a <style></style> tag should work.
Hope this help.
Ok. So there's no way to remove the secondary sidebar.
The only way is to set display:none.
I was searching a different solution....
I'll try to find anoter way.....
Thanks for all
You'll be able to do this without any code in the next version.
was there any update to this? keen to remove secondary sidebar only in a page either via a template or via functions.php without resorting to display:none;
all help appreciated!
Hi, pluggyboy! I also try this solution
for now not only able to display the primary and secondary sidebar on selected pages
but still not ideal.
function remove_sidebar() {
if (is_page(array('published','home','contato'))) {
return FALSE;
} else {
return TRUE;
}
}
add_filter('thematic_sidebar', 'remove_sidebar');Try this example for complete removal:
function remove_widgetized_area($content) {
unset($content['Secondary Aside']);
return $content;
}
add_filter('thematic_widgetized_areas', 'remove_widgetized_area');
or try this for conditional display:
function child_secondary_aside($content) {
$content['Secondary Aside']['function'] = 'child_secondary_aside_display';
return $content;
}
add_filter('thematic_widgetized_areas', 'child_secondary_aside');
function child_secondary_aside_display() {
if (is_page()) {
if (is_sidebar_active('secondary-aside')) {
echo thematic_before_widget_area('secondary-aside');
dynamic_sidebar('secondary-aside');
echo thematic_after_widget_area('secondary-aside');
}
}
}
There is more information on how to manipulate widgetized areas here:
http://themeshaper.com/forums/topic/something-new-bout-widgetized-areas#post-6601
This topic has been closed to new replies.