I'm looking for an option to show a specific Custom post type on a specific page. In a category there are 10 posts but on the homepage I just want to show for example 3 specific post types of that category. What is the best way to have control over this behavior?


1 Answer 1


This way you can make a private listing

function posts_kind($query){

// page id 4173 show


// category id 1 show  

$query->set('cat', 1);

return $query;


  • Thanks, that's a nice solution for a specific template.
    – Bouke
    May 15, 2021 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.