Scenario:
CPT: books
Associated Taxonomy 1: universe
Associated Taxonomy 2: series
Requirement:
For each universe show the books grouped by their series.
Note: Unlike in the screenshot, the code below ensures that if there are no books in a series, the series name will not appear. Also, as can be seen, books were present only in one series for each universe at the time I worked on the site.
Here's the PHP code for this (code inside the function can be used in any WordPress theme):
To view the full content, please sign up for the membership.
Already a member? Log in below or here.