By default, WordPress will only include the post
post type within the post_tag
and category
taxonomy archives.
Use this snippet to add newz
posts to the post_tag
and category
taxonomy archives:
add_filter( 'pre_get_posts', 'wpse_newz_taxonomy_archives' );
function wpse_newz_taxonomy_archives( $query ) {
if ( $query->is_main_query() && ( is_category() || is_tag() ) ) {
$query->set( 'post_type', array( 'post', 'newz' ) );
}
}