-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
With the introduction of the Term List block and the term name block (done in several PRs, lastly #72380) - (Requested in #49094)
Developers are now able to list all of the terms used in a custom taxonomy! that's a great first start.
For example:
- Think of an automotive blog that has a custom taxonomy named Car Manufacturers, they can now create a list of all of the terms (e.g. Ford, Toyota, Honda) that exist on their website.
- A blog for pokemon trading cards with a custom taxonomy of Pokemon, they can now create a list/archive of all the pokemon that have posts associated with them.
(Note, you can also use the Terms List and Term Name block for all taxonomies, even for tags and categories)
However the current terms block does not have block bindings enabled on it; they were were added in #71376 but later removed in #72275
Without block bindings enabled, the lists of terms is a bit limited in its use; a content creator
- cannot link to a custom archive page that would display all of the posts associated that with that term.
@mikachan ; does implementing this require some updates to core ? (I see WordPress/wordpress-develop#9356 still exists)
Does implementing this wait on #72165 ? If so, should we wait for something more long-term like
Some additional examples, include:
-
Term Query Loop Block #49094 (comment) (in this example, there's a featured image for each term)
-
On a project with a custom post type (of Historical Items of African-American History in my town) with a custom taxonomy of material type, and I want to link to the all of the posts associated with the term (e.g. a book, work of art, letter)
below is a screenshot of what I was able to quickly make thanks to the new terms query, terms template, and terms name block; I would love to link those terms so that users can view all of the posts associated with that term.
On a separate project:
With the absence of the Terms Query block, I had been building a workaround alternate solution in PHP like below, where I have a custom post type of ohio authors, and a custom taxonomy named author_genre and wanted to link to the list of all of the posts associated with a particular genre.
