Forums

Bug on wp_list_authors (6 posts)

  1. lordman
    Member
    Posted 1 year ago #

    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)

  2. MichaelH
    Moderator
    Posted 1 year ago #

    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

  3. MichaelH
    Moderator
    Posted 1 year ago #

    Reported in Trac Ticket 4485.

  4. rob1n
    Member
    Posted 1 year ago #

  5. moshu
    Member
    Posted 1 year ago #

    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?)

  6. voorhees98
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.