Sillybean

Feeds for custom content types in WordPress 3.0

As you’ve seen before, there are many feeds that aren’t publicized in WordPress. You can use a query string format similar to the one you used for searches to get feeds of your custom content types. The post_type parameter given should match the name of your custom content type. You can even combine content types. Here are some of the possible feed URLs for custom content types:

Feed Type

Default URL

Clean URL

RSS 2.0
(default)

/?feed=rss2&post_type=course /feed/?post_type=course
/feed/rss2/?post_type=course

Atom 1.0

/?feed=atom&post_type=course /feed/atom/?post_type=course

RSS 0.92

/?feed=rss&post_type=course /feed/rss/?post_type=course

RDF

/?feed=rdf&post_type=course /feed/rdf/?post_type=course

Combining content types

/?feed=rss2&post_type=course,post,page /feed/?post_type=course,post,page

Posted on June 18, 2010 at 10:24 am in WordPress · 8 comments

Sharing this post? The short URL is: http://sillybean.net/?p=2860

8 Responses to “Feeds for custom content types in WordPress 3.0”

  1. john says:

    I can’t make combining content types work. The only post_type parameter that works for me is a single post type. Anything else seems to default to ‘post’.

    Have you got multiple post types to work?

  2. Global_1981 says:

    Thank you for this post! I could only find the feed URL for pretty permalinks on other sites. Problem is I cant seem to get it pretty permalinks working with WordPress on my local machine with MAMP so this has been a great reference!

  3. NylandIT says:

    Great stuff, this has saved me many hours of work in trying (and failing) to create custom rss feed templates. So simple (but seemingly not well documented elsewhere)!

  4. Sergio Soares says:

    Awesmome. Helped me a lot. Thanks

  5. I can’t get the combination of two post types to work either.. Any tricks I should know about?

    “?feed=rss2&post_type=post” works great!

    So does “?feed=rss2&post_type=bkr_resultat”..

    But “?feed=rss2&post_type=bkr_resultat,post” doesn’t..

  6. David Sword says:

    Yeah, the rss multiple post type doesn’t work for me either.. anyone figure it out?

  7. Mark Lambert says:

    I couldn’t get the multiple post types to work either.

    my work around was to modify the normal feed to include my normal posts and custom ones in the main feed.

    added the below snippet to my functions.php


    //adds custom post types to normal feed
    function myfeed_request($qv) {
    if (isset($qv['feed']) && !isset($qv['post_type']))
    $qv['post_type'] = array('post', 'custom post one here', 'custom post two here ect');
    return $qv;
    }
    add_filter('request', 'myfeed_request');

  8. marius says:

    thanks, by reading your article I learned something new about how feeds work in WordPress 3.0 but still I wasn’t able to get an idea of what needs to be done in order to have images in a post linked with the permalink of the actual post. (same link as the title).

    On my blog content consists mostly of images and it would really nice to have these images linked back.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>