How to set up sub-categories for author pages?

I am setting up WordPress for a school. They want to enable teachers to have their own section of the site where they can create posts in different categories (assignments, events, etc).

I know that WordPress supports multiple authors and that I can show posts by those authors out of the box by going to http://domain.com/authors/{username}.

However, instead of just showing all of the posts from different categories in one loop, I would like to allow the user to view posts by category and they can choose from a link menu.

alt text

Can anyone point me in the right direction on how to do this? Is there a way to create a url that would filter posts by author AND category?

1 Answer
1

You should consider to make use of an author template. It will allow you to control how the author page is displayed, so you can add what you pictured into there.

You can then register a rewrite endpoint to create the multiple areas of the author page. In the template just check on which “subpage” you are and display the tabs and listing accordingly.

That’s basically doing WP_Query then which is pretty well documented, so should be an easy start.

Leave a Comment