WordPress provide the reed support with URL. We can see the site feed with below URL pattern:
https://mywebsite.com/feed/
The /feed/ is generated from the WordPress PHP file wp-includes\feed-rss2.php
The have_posts() loop is executed while generating the feed. So, We can use the filter pre_get_posts to show our custom post type feed.
Below is the sample code which add the post, astra-portfolio, and deal post types into the feed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters