WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a site that needs two different tabs: 1. all author written content (Posts, comments, CTP) 2. all author followed content (categories, taxonomies, other users content)

For the first all I could come up with was using unoion on wp_comments and wp_posts filtered by author sorted by date

Have no idea how to do the 2nd one...

Would love some advice

share|improve this question
How are you tracking "followed content"? – s_ha_dum May 5 '13 at 13:10
I have user metadata that contains folowed-users IDs, followed-tax IDs – hannit cohen May 6 '13 at 7:09

Your question is not very detailed or very clear but get_user_meta will return all of the user metadata for a user. That should have all of your fields.

You could also use get_users for the second tab. I am not dealing with the first since you state that your "have no idea how to do the 2nd one"

$args = array(
   'fields' => 'all_with_meta',
   'orderby' => 'nicename',
   'order' => 'ASC',
   'who' => 0, // all users greater than subscriber
   // 'include' => array(1,2,3), // particular users
   // 'role' => 'rolename'
$users = get_users($args);

You could also use WP_User_Query directly.



share|improve this answer
up vote 0 down vote accepted

Found out the solution for #1. using WP_Query I can specify multiple post_type and an author ID. which gives all author written data...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.