I have 7 companies contributing to one blog, and each company has 3 authors. I’d like to show all posts by all authors of one company. Is that possible?
Leave a Reply
You must be logged in to post a comment.
I have 7 companies contributing to one blog, and each company has 3 authors. I’d like to show all posts by all authors of one company. Is that possible?
You must be logged in to post a comment.
To do this literally (put authors into groups) best way would probably be to create custom taxonomy for users. See custom user taxonomies in WordPress for reference.
However the end result you are looking for does not really deal with grouping users – it deals with grouping posts.
Registering custom taxonomy (“company”) for posts would be more simple and straightforward.
See
register_taxonomy()
in Codex.Another simple thing to do would be to add a meta-box to the “users” screen. Call it “company”, and use a drop-down or check box and associate users with a company when they are created.
If you didn’t want to hard code this yourself – you could look into this plugin (or similar).
http://wordpress.org/extend/plugins/cimy-user-extra-fields/
Then in your theme, you set up your query using the new meta-box to filter down by company.