Include posts under a custom taxonomy in author.php
-
The author’s archive (author.php) on the website I’m working on displays only the posts by the current author.
I have a custom taxonomy called “co_writer” which I use to simply tag a post as having been co-written by another author. The “co_writer” terms basically share the same names and slugs with actual authors. For example, John Doe (author) has a “co_writer” term counterpart John Doe.
I need a code that will allow me to also display on an author’s archive posts that have that author’s name used as the term for the “co_writer” taxonomy. So if John Doe has been tagged as co-writer in a post mainly credited to Jane Doe, that post will also show up on John Doe’s author archive. Right now, the posts only appear on the main author’s archive since I lack the code that will grab those into the intended co-author’s page as well.
Is this possible? I was told pre_get_posts might be of use in this case, but I don’t know how exactly I can make it work. Thanks to anyone who can help.
The page I need help with: [log in to see the link]
- The topic ‘Include posts under a custom taxonomy in author.php’ is closed to new replies.