I am trying to display the 10 latest custom_post_type posts and blog posts on my homepage in a single query – so that I have 10 posts in total, sorted by post_date in DESC order, containing all posts from my custom_post_type and blog posts from a certain category.
This query doesn’t seem to work:
$args = array ( 'cat' => 3, 'post_type' => array ( 'custom_post_type', 'post' ) );
It fetches only the blog posts from the category 3, but no custom_post_type posts.
- The topic ‘Get all custom_post_type posts blog posts from one category in a single query’ is closed to new replies.