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

Featured Posts Problem

Hey guys,

So I've setup 3 custom post types.. "web", "print" and "brand" .. on each project in those I have an option "yes" or "no" which will make it a featured project.. i.e. show it on the front page..

On the front page I have the following code..

$args = array(
                'post_type' => array('web','print','brand'),

                    'orderby' => 'date',
                    'order' => 'DESC'

            );

But that only shows the featured projects from "print" .. have I done something wrong?

1 Answer

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

What happens when you pass each custom post type by itself through the array. Do you see web then print then brand projects display?