So this is what I have done for my homepage so I load css that only loads on my homepage
function enqueue_frontend_assets(){
if(is_page_template( 'homepage.php')) {
wp_enqueue_style( 'homepage', get_template_directory_uri().'/assets/css/homepage.css' );
}
}
And it works just fine and only loads on the homepage.
I am trying to load the exact same file for my custom taxonomy page but it doesn't load.
function enqueue_frontend_assets(){
if(is_page_template( 'taxonomy-state.php')) {
wp_enqueue_style( 'homepage', get_template_directory_uri().'/assets/css/homepage.css' );
}
}
What should I use instead to make sure it loads on all the custom taxonomy pages?