0

I am trying to create an archive page that shows posts that are in two categories in the same list. The listing should only contain posts that belong to BOTH categories, and not posts belonging to one OR the other.

I know this can be done in visual composer / divi but I would rather have this on the archive page itself.

Thanks

  • There are 6 types of archive. Author, category, date, tag, custom post type and custom taxonomy. which type of archive do you want to create? – obiPlabon Feb 27 '18 at 17:02
  • category archive – user39156 Feb 27 '18 at 17:15
  • Are you using a custom archive.php template? – Xhynk Feb 27 '18 at 18:30
  • And/or are you adding a new page with it's own permalink, like example.com/two-categories? – Xhynk Feb 27 '18 at 18:36
  • Are those two categories predetermined? If yes, then you can create a custom page template with a custom query and use category__and parameter to pass those categories ids as an array. category__and will make sure posts are in both categories. – obiPlabon Feb 27 '18 at 18:41

Your Answer

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

Browse other questions tagged or ask your own question.