add_action( ‘pre_get_posts’, ‘add_custom_post_types_to_loop’ );
function add_custom_post_types_to_loop( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( ‘post_type’, array( ‘post’, ‘portfolio’ ) );
return $query;
}
add_action( ‘pre_get_posts’, ‘add_custom_post_types_to_loop’ );
function add_custom_post_types_to_loop( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( ‘post_type’, array( ‘post’, ‘portfolio’ ) );
return $query;
}