Hey I'm trying to create a list of authors (w/ desc) for a site I'm making and stumbled on this function, is there a way to achieve similar results with the latest version of wordpress?
The codex entry is here.. -http://codex.wordpress.org/Function_Reference/get_users_of_blog
Any advice would be great.
publicradio
Member
Posted 1 year ago #
The codex is telling me get_users() is the new function but I'm having trouble passing any variables to this.
The other functions show an example and unfortunately there are no examples for this new function in the codex. I would like to get_users from another blog in a multisite installation, with the role of 'contributor', and spit out a list of their emails. The function says blog_id and role are variables I can pass but they don't work for me.
Can someone post some examples of get_users, or at least one example? Thanks.
publicradio
Member
Posted 1 year ago #
OK I got a basic function working with get_users and I added it to the codex.
thefatguy
Member
Posted 1 year ago #
Can you provide an example, either here or in the codex, for using include and exclude? I'm doing this, and getting a list of everybody, which is like 1000 subscribers that I don't want.
$blogusers = get_users('blog_id=1&orderby=post_count&order=DESC&include=(86,99)');
I tried 'include(86,99)' as well...same results. I tried delimiting it with role=administrator, and got nothing at all.
thefatguy
Member
Posted 1 year ago #
Durrr...found my own answer:
$blogusers = get_users('blog_id=1&include=99,86');
I really thought I'd tried that.