• Version 2.2.0
    wp_list_authors counts pages and posts

    To correct it:

    SELECT DISTINCT post_author, COUNT(ID) AS count
    FROM $wpdb->posts
    WHERE (post_status = ‘publish’ and post_type=’post’)
    GROUP BY post_author”) as $row)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Good catch, now just what do the developers intend there? Did they intend to count pages or not?

    Do you want to report that to Trac? If so use your forum Login/password to login at trac.

    See: Reporting Bugs

    Reported in Trac Ticket 4485.

    Hmmm. Looking at the fix, shouldn’t be both? i.e. post_status and post_type? (Using only post_type will not show the drafts, too?)

    I just upgraded to 2.2.1 and noticed the issue discussed here. I made the changes mentioned in Trac Changeset 5727, and it fixed the issue I was trying to fix (not counting pages, only posts). However, I got a new error when I tried to add or edit an item in my Blogroll. The error is below.

    Warning: Cannot modify header information – headers already sent by (output started at /home/www/sjvoorhees.farvista.net/wordpress/wp-includes/author-template.php:248) in /home/www/sjvoorhees.farvista.net/wordpress/wp-includes/pluggable.php on line 331

    Not sure if someone has seen this or not, but thought I would pass it along. Should I add this to the Trac Ticket?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug on wp_list_authors’ is closed to new replies.