Welcome to the Treehouse Community
Looking to learn something new?
Jaime RiosCourses Plus Student 21,100 Points
Displaying the most recent element for each custom post-type.
What would I need to display the most recent element for each custom post-type on front-page.php.
I know how to make it display one for each custom post-type, but how does it work for the most recent of each post-type?
Garrett Sanderson12,735 Points
What you have to do is call for the different post types in your $args array that you pass into the WP_Query.
You will just need to change up your code a bit for the post type item in the array. You need to add an array of your post types that you want to call.
<?php $args = array( 'post_type' => array( 'post', 'report', 'opinion', 'bookmark' ) ) ?>