Querying Members in A Level
Posted: April 10th, 2011, 4:32 pm
Greetings,
I'm very new to WP and S2 Member. Currently using the free version but am planning up going with S2 Member Pro.
I want to create a "page of posts" using a fairly standard version of the loop. But what I want to accomplish is that the page of posts contains only the posts that are _authored_ by members of a particular level.
What's the best way to build a list of IDs of users in a particular level?
I'm very new to WP and S2 Member. Currently using the free version but am planning up going with S2 Member Pro.
I want to create a "page of posts" using a fairly standard version of the loop. But what I want to accomplish is that the page of posts contains only the posts that are _authored_ by members of a particular level.
- Code: Select all
$leaderlist = S2functionhere("LeaderLevel");
//diyc
$args = array(
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged,
'author' => $leaderlist, //diyc
);
$wp_query = new WP_Query($args);
What's the best way to build a list of IDs of users in a particular level?