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 Theme Development Custom Post Type Templates in WordPress Custom Post Type Templates in WordPress Quiz

Can you be of any help solving the following challenge? my answer as indicated below turnd out a bummer

When you use the following in your code $query = new WP_Query( $args ); What must you also add before have_posts() in your custom Loop?

The Loop if ( $the_query-> have_posts()

2 Answers

Joel Bardsley
Joel Bardsley
31,246 Points

Nearly correct, just note that the WP_Query object is being stored in the variable $query and not $the_query

thanks a lot