How to prevent episodes from shows to appear in the main feed

We made the decision in the very beginning of the development that multiple podcasts means setting up a WordPress multisite. It’s not something that is changeable at this point unfortunately. The “shows” feature was an afterthought that sometimes is good enough for certain use-cases, but wasn’t aimed at modeling “completely separate podcasts”.

You can try this code snippet. Disclaimer: untested LLM output, but it looks plausible.

<?php
add_action("template_redirect", "my_disable_unfiltered_podlove_feed", 9);

function my_disable_unfiltered_podlove_feed()
{
    if (!is_feed()) {
        return;
    }

    // Only target Podlove feeds, not arbitrary WordPress feeds.
    if (
        !function_exists("\\Podlove\\Feeds\\get_feed") ||
        !\Podlove\Feeds\get_feed()
    ) {
        return;
    }

    // Allow show feeds like /show/my-show/feed/mp3/
    if (get_query_var("shows")) {
        return;
    }

    global $wp_query;
    $wp_query->set_404();
    status_header(404);
    nocache_headers();

    exit();
}