LUCiD GRAFiX Logo

Tutorial
YouTube RSS Feed
Search

TUTORIAL

How to add custom post types to your feed

Written by Posted on March 6th, 2013 No Comments
Share This

First you will need:

  • functions.php
  • The name of the custom post type, exactly the way you registered the post type.
How to add custom post types to your feed

You want to make sure that you have the post type exactly how its registered. In this case it is healthfacts.

Above where it says  $vars['post_type'] = array( 'post','healthfacts' ); you can add as many post types as you want. Just add them to the array.  An array stores multiple values in one single variable. To find out more info about arrays, check out http://www.w3schools.com/php/php_arrays.asp.

Copy and paste that snippet into your functions.php and you will now have your post and the custom post type in your feed.

To get to your feed go to http://YOUR_URL.com/feed/. That version is displayed in XML. However you can something like feedburner and it will clean your feed up as well as give you analytics on your feed. It is a service through Google.

XML Feed

How to add custom post types to your feed

Feed Burner

How to add custom post types to your feed

I would strongly recommend http://feedburner.com and if you have any questions feel free to ask, otherwise happy coding!

About

Hi, my name is Eric Young. I’m a web designer who has worked in the IT industry since 2000. I love blogging and making the web a better place. If I'm not here I'm probably playing Gears of War. LOL

Related Articles You Might Enjoy!

Change Wordpress Avatar size Change WordPress Avatar size
How to add a Sidebar in Wordpress How to add a Sidebar in WordPress
http://codex.wordpress.org/WordPress_Feeds How to remove the authers name off a RSS feed in wordpress
Leave a comment

Leave a Reply