Hi I have this function to call a simple page template I have created for the category event, which works great, but I'm struggling to format the function code correctly to add more, i thought it would be a question of adding elseif statement, but I can;t get it to work - can anyone educate me?
function get_custom_cat_template($single_template) {
global $post;
if ( in_category( 'Event' )) {
$single_template = dirname( __FILE__ ) . '/single-event.php';
}
return $single_template;
}
add_filter( "single_template", "get_custom_cat_template" ) ;
Try something like that: