How to customise RSS feed on my wordpress site
-
Hello,
I have the following code in my wordpress theme functions file to include a few custom post types along with my regular posts in my main RSS feed.
function myfeed_request( $qv ) { if ( isset( $qv['feed'] ) && !isset( $qv['post_type'] ) ) { $qv['post_type'] = array( 'post', 'events', 'awards', 'media' ); } return $qv; } add_filter( 'request', 'myfeed_request' );
That’s working great.
I know I can also do a feed for each custom post type using:
feed/?post_type=event
for example.Now, I also need a feed just for my main posts.
I tried this:
feed/?post_type=post
But that included everything so must trigger the code above in my functions file.So basically, I need a feed for just my main posts on their own and a separate feed for my main posts PLUS my custom post types together in one feed.
How can I achieve this please does anyone know?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to customise RSS feed on my wordpress site’ is closed to new replies.