I would like to hide the sidebar on certain post types. I can hide it on one post type by using:
if ('example' != get_post_type()) {
How could I use the above with an array?
$hide_sidebar = array('example1', 'example2', 'example3'); //hide sidebar on these post types
if( /*post type is not in $hide_sidebar*/ ){
get_sidebar();
}
Aucun commentaire:
Enregistrer un commentaire