I’m using this
add_filter( 'pre_get_posts', 'tgm_io_cpt_search' );
/**
* This function modifies the main WordPress query to include an array of
* post types instead of the default 'post' post type.
*
* @param object $query The original query.
* @return object $query The amended query.
*/
function tgm_io_cpt_search( $query ) {
if ( $query->is_search ) {
$query->set( 'post_type', array( 'post', 'video') );
}
return $query;
}
to include searches but I tried to use this to include the videos type in the “categories” on the front page as well as just have it show up on the front page and had no luck there.