Filtering data using Taxonomies
-
Hi,
As I’m setting an on line library, I followed the pod’s tutorial that was very helpful. But as I need to have a more detailed library, i needed to organize the information using several CPTs and taxonomies.
As the library is organized by CPTs corresponding to each publication type available (books, magazines, papers…), an author may have publications of more than one kind.
To allow visitors to search publications by type I’ve created also a custom taxonomy labeled “publications types”, with the several types of publications and a parent one labeled as “all publications types”.
I made a relationship between authors and the publications types, but to show all the publications of an author on its profile page, all the publications types must be filtered using a custom field for each publication type.
This is the code for my pod’s template for the author’s profile page:
<p>{@biografia}</p>
<h4>Publicações de {@post_title} em ArchTech<sup>®</sup></h4>
<p>Monografias:</p>
<p> {@publicacoes_do_mesmo_autor_monografia}</p><p>Monografias com Editores:</p>
<p> {@publicacoes_do_mesmo_autor_monografia_editores}</p>I tested it with two types of publications and it shows the publications titles of the author and leaves an empty field if no titles are available for a publication type, the titles links to each publication post.
It’s all working quite well, but there is an issue that I’m wondering if could be improved:
– Publications titles of an author must be selected manually on each publication type’s custom field, which takes a lot of time and may not be accurate, as some titles may be forgotten.So, my question of you may help:
-Is it possible to create in the author profile’s pod a relationship between the publication type’s custom field, the publication type’s custom taxonomy and the author’s name to sort automatically the publication titles using the template code, instead of selecting it manually on each custom field?Thanks on advance.
Rogerio
The topic ‘Filtering data using Taxonomies’ is closed to new replies.