Support » How-To and Troubleshooting » A report plugin: wp_list_authors() and switch_to_blog()
5 years, 4 months ago
Hi, I’m writing a small plugin to have a global report of all authors posts number of the network.
The plugin shows the list of all blogs, when the admin clicks a blog, a box appears with the output of wp_list_authors for that blog.
All good, on the chart, but it doesn’t work.
switch_to_blog( $expand_blog_id );
'orderby' => 'post_count',
'order' => 'DESC'
This code doesn’t seem to work, nothing is output. Any idea why?
I used switch_to_blog() with wp_count_posts() in the same plugin and it worked, may be that it does not with wp_list_authors()?