custom post types don’t appear in RSS

I created custom post-types in my site but these posts are not shown in the RSS. Only the regular posts appear there.

What could be preventing them from showing up there

Related posts

Leave a Reply

1 comment

  1. They don’t normally show there
    That is how they are supposed to work.
    Each CPT has a feed of it’s own by default
    Everything in WP has a feed it seems!

    But if you want them in your main feed

    this can go in your functions.php

    // ADDS POST TYPES TO RSS FEED
    function myfeed_request($qv) {
        if (isset($qv['feed']) && !isset($qv['post_type']))
            $qv['post_type'] = array('ve_products', 'post');
        return $qv;
    }
    add_filter('request', 'myfeed_request');
    

    You see this line:

    $qv['post_type'] = array('ve_products', 'post');
    

    That includes normal posts and my CPT of ve_products in my main feed

    You would swap out that for your CPT, if you have more CPTs, add them into that array