Support

Account

Home Forums General Issues Display posts from specified category Reply To: Display posts from specified category

  • Yes, you can include a tax_query, or you can include category parameters in your query if you are using the standard categories taxonomy.

    However, if you’re using a custom post type I would suggest that you also use a custom taxonomy. The reason is that WP does not know how to tell the difference between standard posts and a custom post type when showing post categories and your custom posts will probably appear on your category archive pages.

    For category parameters: https://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters

    For Tax Query: https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters