I've created a CPT & used the default category & tags instead of creating new taxonomy for those CPT.

Now while generating the 'list all'/ archive page, my query is returning only the posts that added through the default posts> section of admin menu.

What if I want them separately? Should I use independent page templates with custom query?


Custom post types are not included in the ordinary archives by default, even if registered with the taxonomies argument. You will need to add the post type to the query yourself.

  function($qry) {
    if ($qry->is_main_query() && $qry->is_category()) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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