How to display a generated list of taxonomy items?
-
I’m building a website for a small brick and mortar store. I’m able to display a list of items belonging to a specific content type, but I don’t understand how to display a list of items belonging to a specific taxonomy.
https://www.ostraining.com/class/pods/ explains how to create a list of books, a list of authors, but not a list of genres, or a list of book languages. How do I do that?
Suppose I would like to end up with:
- domain.tld/books/ [overview of books]
- domain.tld/book/book-A/
- domain.tld/book/book-B/
- domain.tld/authors/ [overview of authors]
- domain.tld/author/author-X/
- domain.tld/author/author-Y/
- domain.tld/genres/ [overview of genres]
- domain.tld/genre/horror/
- domain.tld/genre/scifi/
- domain.tld/languages/ [overview of languages]
- domain.tld/language/english/
- domain.tld/language/german/
I already created:
- Book: content type
- Author: content type
- Genre: taxonomy
- Language: taxonomy
Book fields:
- Relationship with author
- Genre taxonomy: horror, scifi
- Language taxonomy: English, German, French
To create an overview of books, I created a regular WordPress page that contains the shortcode:
[pods name="books" orderby="post_title ASC" template="list-of-books-template"]
To create an overview of authors, I created a regular WordPress page that contains the shortcode:
[pods name="authors" orderby="post_title ASC" template="list-of-authors-template"]
Suppose I create a page
domain.tld/genres/
. To create an overview of taxonomy items on a regular WordPress page, the same trick results in a database error("Unknown column 'post_title' in 'order clause")
.If I use
[each genre]<li>{@name}</li>[/each]
on a regular WordPress page I end up with the code published on the page, not with a list.- How do I end up with a page that shows an overview of the available genres?
- Is it also possible to have Pods auto-generate such pages? (E.g. if I go to domain.tld/genre/ that it just shows all the genres)
- The topic ‘How to display a generated list of taxonomy items?’ is closed to new replies.