Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress for Website Owners Adding and Editing Content Custom Post Types and Fields

Andy Flintoff
Andy Flintoff
1,898 Points

How do you add an additional post feed to your site? for example: a feed for blog posts and a feed for video posts?

I want my site to be able to have more than one post feed. Where posts are added in reverse chronological order with the newest added to the top but i want separate feeds for blog posts and video posts. how would i go about building this?

2 Answers

Hey Andy,

You can create custom loops with the WP_Query() Class. So for example you can use your normal loop for your blog posts and a custom loop for your video custom post types.

For more information you can take a look at the following link: https://codex.wordpress.org/Class_Reference/WP_Query

Andy Flintoff
Andy Flintoff
1,898 Points

Thanks that's really helpful!