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

Ben Taylor
Ben Taylor
902 Points

Making a featured projects page

Hey guys,

I've put together a portfolio using the custom post types tutorial on here. So I have 3 pages, web, brand and print.. On my homepage I'd like to have 6 featured projects, which I can pick and order myself.. can anyone think of an easy way to do this?

Thanks!

Ben

1 Answer

Chris Shaw
Chris Shaw
26,676 Points

Hi Ben,

To do this you would need to use a custom post type query within your template to retrieve the portfolio items as there's no generic way of doing this within WordPress.

What you want to be looking at is WP_Query which allows you to create custom queries against any valid post type in your current WordPress installation.