Note that $query->is_feed()
is true for both feeds, so you’re changing both of them with the pre_get_posts
hook.
I skimmed quickly through the WP_Query
object for those feeds and if you want to combine these two post types, only for the main feed example.tld/feed/
, you could try:
add_filter( 'pre_get_posts', function( \WP_Query $q )
{
if (
$q->is_feed()
&& ! $q->is_archive()
&& ! $q->is_singular()
&& ! $q->is_comment_feed()
)
$q->set( 'post_type', [ 'post', 'blood-blog' ] );
} );
I might be missing some checks, so you might want to double check it.
ps: it would be nice to have is_feed_home()
or is_main_feed()
here 😉