Hi Chris, great function, I'm using it with success. Quick question...can I designate several pages in the same function? I tried adding a page a couple different ways.
Adding as comma separated list:
function remove_sidebar() {
// We test if we are on the page 'Literature Request Form'
if (is_page('literature-request-form,residential-products')) {
// 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');
This didn't work.
Adding like this:
function remove_sidebar() {
// We test if we are on the page 'Literature Request Form'
if (is_page('literature-request-form'))
// Yes, we are .. now we switch off the sidebar
// We test if we are on the page 'Residential Products'
if (is_page('residential-products')) {
// 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');
This removed the sidebar on ALL pages.
I have a feeling I'm missing something simple. Can anyone advise?