Add more than one custom post type to wordpress home page post loop

Your second function overwrites the query of the first. It’s not necessary anyway as you can add as many post types to the $query->set line in the first function as you need, like this:

$query->set( 'post_type', array( 'post', 'first_function', 'my-second-post-type','another-post-type' ) );

BTW, is your post type actually called ‘first_function’? Just asking as that’s the name of the function too.

Hope that helps