has_tag()
is a function that will check if a post
has a certain tag
You could integrate it into your code like so:
function my_category_templates($single_template) {
global $post;
if ( in_category( 'raspee' )) {
$single_template = dirname( __FILE__ ) . '/single-raspee.php';
}
if ( has_tag( 'everyone' )) {
$single_template = dirname( __FILE__ ) . '/single-everyone.php';
}
return $single_template;
}
add_filter( "single_template", "my_category_templates" );
you can check out this function here:
https://developer.wordpress.org/reference/functions/has_tag/