How to create a RSS feed for Custom Post Types in Wordpress                                  Wordpress has a default feed ...
Your feed should now look something like this:http://www.yoursite.co.za/taxonomy/taxonomycategory/feed/feed/?post_type=tax...
Upcoming SlideShare
Loading in …5
×

How to create a rss feed for custom post types in wordpress

2,501 views
2,367 views

Published on

How to create a rss feed for custom post types in wordpress

Published in: Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,501
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

How to create a rss feed for custom post types in wordpress

  1. 1. How to create a RSS feed for Custom Post Types in Wordpress Wordpress has a default feed that looks something like this – http://www.yoursite.co.za/feed/ and this feed serves any posts you make. But for developers that prefer to make use of custom post types, it becomes a whole new ballgame. And that is exactly what happened to me. I am busy creating a site www.careerexpress.co.za where I make use of custom post types for portfolios as well as open positions or opportunities. Off course I would like to give my prospective clients the ability to subscribe to the new portfolios and positions as the get added tothe site.After a lot of trial and error I made my first successful RSS feed for Custom Post Types in Wordpress.Step 1 – Determine the link to the Custom Post TypeIn my case the Custom Post Type (always use the slug and not the name) is “openposition”.Step 2 – Create the Custom Post Type RSS Feed URLIf you want a RSS feed directly for the Custom Post Type you will create the following link.http://www.yoursite.co.za/feed/?post_type=yourcustomposttypeFor my site the link will look like this:http://www.careerexpress.co.za/feed/?post_type=openpositionYou can add this feed either to Feedburner or FeedBlitz (which by the way allows you to earnrevenue from your feeds). Or you can add it to your RSS Feed widget in Wordpress.Usually when we create Custom Post Types, we have Taxonomies going with each Custom Post Typewith Taxonomy Categories. To add a taxonomy to your feed do the following (please note thedifference in the URL):Step 1 – Determine the full URL to the Taxonomy and CategoryThe URL should look something like this: http://www.yoursite.co.za/taxonomy/category/For my site the link will look like this:http://www.careerexpress.co.za/openpositions/freelancing/Step 2 – Create the Custom Post Type RSS Feed with TaxonomyAdd the following to your Custom Post Type and Taxonomy URL:feed/?post_type=taxonomy&taxonomycategory=category 6 Van Zyl Street, Klerksdorp, 2571 ~ www.freelanceexpress.co.za ~ admin@freelanceexpress.co.za Cell: 084 603 5131 ~ Fax: 086 696 1890 ~ Skype: maryke_anne1
  2. 2. Your feed should now look something like this:http://www.yoursite.co.za/taxonomy/taxonomycategory/feed/feed/?post_type=taxonomy&taxonomycategory=categoryMy site has a taxonomy ‘openpositions’ and under this it has different categories such as‘accounting’ and ‘freelancing’. In this case I am going to use ‘freelancing’ as the category.This is what my RSS feed for my Custom Post Type with Taxonomy and Category looks like.http://www.careerexpress.co.za/openpositions/freelancing/feed/?post_type=openposition&openpositions=freelancingYou can add this feed either to Feedburner or FeedBlitz (which by the way allows you to earnrevenue from your feeds). Or you can add it to your RSS Feed widget in Wordpress. 6 Van Zyl Street, Klerksdorp, 2571 ~ www.freelanceexpress.co.za ~ admin@freelanceexpress.co.za Cell: 084 603 5131 ~ Fax: 086 696 1890 ~ Skype: maryke_anne1

×