WordPress.org

Support

Support » Plugins and Hacks » Co-Authors Plus » [Resolved] [Plugin: Co-Authors Plus] count_user_posts function not counting co-authors

[Resolved] [Plugin: Co-Authors Plus] count_user_posts function not counting co-authors

Viewing 11 replies - 1 through 11 (of 11 total)
  • agomendes

    @agomendes

    Any idea to fix this issue? This is a bit urgent because all posts that were written by two authors are not being counted to the co-author. The people are claiming with some reason.

    Many thanks for your help and support.

    Nothing?! I really need to fix this.

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    Sorry, I’ll take a look at this when I have a moment

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    I did some testing on this and partially confirm the results but not entirely.

    When I first activate the plugin, the results produced by count_user_posts() are inaccurate. Co-authors are actually stored as terms under the ‘author’ taxonomy. Their post count is the ‘count’ column in the term_taxonomy table. I think our activation script isn’t up to par and these post count values aren’t properly updated until the post is saved again.

    Could this explain what you’re seeing, or can you clarify further with how your data is inaccurate?

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    @agomendes Any chance you could provide screenshots too? Thanks

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    Improved how user post counts are calculated in this ticket. Improvements will be available in v2.6.

    If you have screenshots to indicate where you’re getting stale numbers, it would be great for ensuring what I’ve committed fixes your problem.

    Thanks!

    Thanks for the 2.6 update, Daniel. I really like this plugin and hope to start using it soon. Right now this post count issue is the only thing holding me back.

    So the problem I run into is that once active, the post counts on my author templates are only counting those posts where the author is a co-author. So without the plugin active, my own author template looks like this: http://cl.ly/1D2n1H3D0H2v1e3l1U1B but after activation it looks like this: http://cl.ly/3C2H0X1h2f2I3t3v3d30. My author archive itself is http://wpcandy.com/author/ryanimel.

    Right now I’m using this in the template: https://gist.github.com/1514035

    Hope that helps — if there’s other information you’d like to have to debug it, just let me know.

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    Thanks Ryan. This should actually be fixed in v2.6 because we’re filtering the function. You can also use count_user_posts().

    If the number appears inaccurate, can you go to a post where you’re an author or co-author, hit update, and see if the post count is changed?

    Ah, fantastic Daniel, thanks. I should have thought to update a post so the filter can run. That issue’s fixed for me, and I’m happily using it now πŸ™‚

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    Awesome, glad to hear it works πŸ™‚

    Sorry for this late answer. Now it’s working like a charm.

    Daniel, Thanks for your support and effort.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] [Plugin: Co-Authors Plus] count_user_posts function not counting co-authors’ is closed to new replies.
Skip to toolbar