Descripción
Por default los CPT no se muestran entag.php, este código hace que wordpress los identifique.
Referencia
Lenguaje del código
HTML – WordPress
// Agregar a function.php para que los CPT aparezcan en los tags
function wpse28145_add_custom_types( $query ) {
if( is_tag() && $query->is_main_query() ) {
// this gets all post types:
$post_types = get_post_types();
// alternately, you can add just specific post types using this line instead of the above:
// $post_types = array( 'post', 'your_custom_type' );
$query->set( 'post_type', $post_types );
}
}
add_filter( 'pre_get_posts', 'wpse28145_add_custom_types' );