1

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

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.