setup/Theme/Hooks/Archives.php
/**
	 * Checks to make sure we're on a generic archive page (taxonomy, date, etc.) and
	 * not a specific post type archive, then adds our custom post types to the query
	 * @param Array $query
	 */
Checks to make sure we're on a generic archive page (taxonomy, date, etc.) and
not a specific post type archive, then adds our custom post types to the query
@param Array $query
Checks to make sure we ' re on a generic archive page ( taxonomy date etc . ) and not a specific post type archive then adds our custom post types to the query @param Array $query
public function add_cpt_to_archives($query){
		$post_types = [
			'post'
		];
		if ( $query->is_main_query() && $query->is_archive() && !$query->is_post_type_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
			$query->set( 'post_type', $post_types );
		}
	}
public function add_cpt_to_archives ( $ query ) { $ post_types = [ 'post' ] ; if ( $ query -> is_main_query ( ) && $ query -> is_archive ( ) && ! $ query -> is_post_type_archive ( ) && empty ( $ query -> query_vars [ 'suppress_filters' ] ) ) { $ query -> set ( 'post_type' , $ post_types ) ; } }
Checks to make sure we're on a generic archive page (taxonomy, date, etc.)
Checks to make sure we ' re on a generic archive page ( taxonomy date etc . )
// Add post types to this array to include them in the standard RSS feed