I often have guest posts on my sites and some of co-authors articles. How can I count the number of co-authors posts separately from single-author posts.
For single-author posts I often use the following code:
get_var("SELECT COUNT(*) FROM $wpdb->posts
WHERE post_status = 'publish' AND post_type = 'post'
AND post_author = '8'
AND MONTH(post_date) = $this_month
AND YEAR(post_date) = $this_year");
How about co-author posts?
I have looked up the tables at wp_posts và wp_postmeta but it's still show only one author (main author) for this post
Thank you if anyone has solution.