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!

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

Any help with questions?

Any help with filling these in?

1,The _____() function helps us customize the WordPress Loop using special parameters.

2.$query = new WP_Query( $args ); What must you also add before have_posts() in your custom Loop? _______________have_posts()

3.What would you name the single template file for a custom post type named 'music'?_____.php

Any help would be great :D

14,636 Points

I can't help because I haven't taken the WP course and know nothing about WP as of yet but isn't that covered in the video? lol

I checked the vids multiple times and cant find anything about them. Still waiting for other replies though.

2 Answers

Mathieu HAYS
Mathieu HAYS
9,623 Points

I've checked the videos and the information is there.

For the first question of your post, they refer to the object you instantiate (with $query = new ******( $args ) ).

The second question is exactly the same case as the videos from the course. You just have to specify the variable containing your custom query (without forgetting "->")

For the third question, they ask you how would you name the single.php file for the custom post type "music". When you query a page which is a custom post type, wordpress will look for a file named like single-{custom-post-type}.php

Hope that makes sense and that I don't give away the answers completely.

Thanks man, my mind just blanked for the entirety of the time I watched the last few vids. cheers :)

Anastasia Khazova
Anastasia Khazova
5,640 Points

Answer for the first question is: wp_query Answer for the third question is: single-music.php