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

query a custom post,its taxnomy and specific taxonomy

l have created a custom post type in my Wordpress theme. l want to query the latest post from this post type. its taxnomy and specific taxnomy. the post type is called laptops the taxnomy called notebooks the specific taxnomy under this notebooks taxnomy is called apple. l have had a shot it and this is my code below

<?php $latest = new WP_Query( array( 'post_type' => 'laptops ', 'taxonomy' => 'notebooks', 'terms' => 'apple')); if($latest->have_posts()): ?>

However this is not passing and three posts with the category don't appear however it draws all of the posts in the post type. Zac Gordon