How to retrieve zero post users in wordpress?
I want to retrieve those auth开发者_StackOverflow社区ors that have zero or no posts in wordpress. what will be the easiest way?
This query should do the magic for you.
SELECT *
FROM wp_users
LEFT OUTER JOIN wp_posts ON ( wp_users.id = wp_posts.post_author )
WHERE wp_posts.post_author IS NULL
<?php wp_list_authors('exclude_admin=0&hide_empty=0'); ?>
if you set hide_empty=1
- it will show those with 1 or more posts.
精彩评论