How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
Try using is_post_type_archive() and is_singular(): // … if ( is_post_type_archive( ‘my-post-type’ ) || is_singular( ‘my-post-type’ ) ) { // your enqueue code goes here } // … These functions will check to see if you’re on, respectively, an archive page for the post type my-post-type or a single my-post-type post. (Change the my-post-type to what … Read more