How to determine if custom post type showing on archive templates
You can get the post type object and check its properties. For example: $post_type = get_post_type_object( ‘books’ ); if( $post_type->exclude_from_search ) { // The post type is not included in search results } if( $post_type->has_archive ) { // The post type has archive } As far I know, custom post types are not included in … Read more