function print_recipes_post($query){
if (!is_admin() && $query->is_main_query()) {
//add posts to home
if (is_home()) {
$query->set('post_type',['post','recipes']);
}
}
}
add_action('pre_get_posts','print_recipes_post');
function print_recipes_post($query){
if (!is_admin() && $query->is_main_query()) {
//add posts to home
if (is_home()) {
$query->set('post_type',['post','recipes']);
}
}
}
add_action('pre_get_posts','print_recipes_post');