Remove sidebar

Add this function to functions.php to remove the sidebar from a Thematic child theme (either globally or conditionally):

// Remove sidebars from feature template
function remove_sidebar() {
// We test if we are on the page template 'Feature'
if (is_page_template('feature.php')) {
// Yes, we are .. now we switch off the sidebar
return FALSE;
} else {
// we are not .. we leave the switch on
return TRUE;
}
}
// Connect the filter to thematic_sidebar()
add_filter('thematic_sidebar', 'remove_sidebar');

HT: Themeshaper forums

This entry was posted in Code snippets and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting