TCG503
Member
Posted 4 months ago #
Using WP as a multi-author blog for fiction. Each story has a category and each author may have more than one. So I need a way to list all categories that a user has posts in on the author page.
I've looked through the codex site but can't seem to find a code for it.
http://slpublishinggroup.com/sitenew/
The template example in Author Templates will show you an author's posts and the category listed with each post...
TCG503
Member
Posted 4 months ago #
I think I need to clarify a bit. I don't want the posts listed just the categories that the author has posted in. The Categories store chapters for each authors stories.
Guess it would be something like:
1.Get author's posts
2.Iterate through those posts and save the categories on each post to an array
3. Iterate through category array to return a list of the category names.
TCG503
Member
Posted 4 months ago #
Any suggestion on how I'd go about doing that?
What pages of the codex should I be looking at?
1. the template tag, query_posts(), to get the posts
2. wp_get_post_categories() to get the post categories
3. get_categories() to get the category descriptions