Thanks for writing back.
I'm afraid, we don't have copy-paste code snippets available for these exact requirements, but if you need more personalized assistance using the functions from my last reply, you can consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
If your goal is to create a visual list of posts from those scenarios, you can alternatively use Views, which won't require custom code.
1) Episodes that are not related to any "parent" Podcast
You can create a new post view that shows the "Episodes" posts.
At this point, this view will show all the "Episodes" posts, and to limit the results only to those without any parent "Podcasts" post, you can wrap the output of the individual loop item content in a conditional check like this:
<wpv-loop>
[wpv-conditional if="( '[wpv-post-id item="@podcast-episode.parent"]' eq '' )"]
.......
[/wpv-conditional]
</wpv-loop>
For "Episodes" posts without any parent "Podcasts" post, the parent ID "[wpv-post-id item="@podcast-episode.parent"]" shortcode will be empty.
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/ )
Note: Please replace "podcast-episode" with the actual slug of the post-relationship on your website.
The final result would be that only posts without any parent posts will show on the front-end.
Guide on using conditional output:
https://toolset.com/documentation/legacy-features/views-plugin/using-shortcodes-in-conditions/
2) Episodes that ARE related to a "parent" Podcast, but that podcast is not in publish status
You'll create a post view that shows the "Episodes" posts, same as the last case, however, the conditional check would be different:
<wpv-loop>
[wpv-conditional if="( '[wpv-post-id item="@podcast-episode.parent"]' ne '' ) AND ( '[wpv-post-status item="@podcast-episode.parent"]' ne 'publish' )"]
.......
[/wpv-conditional]
</wpv-loop>
It will only show those "Episodes" posts that have a parent "Podcast", but that parent's status is not "publish".
3) Episodes that WERE related to a "parent" Podcast, but that podcast has been deleted / the parent ID no longer exists
When a parent "Podcast" post will be properly deleted, Toolset will automatically delete the relevant associations with the child "Episodes" too. Based, on this, I'm not sure if you need a separate list for this scenario.