Title: Plugin not pulling correct author
Last modified: November 15, 2018

---

# Plugin not pulling correct author

 *  Resolved [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * (@rhisflow)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/)
 * Hi there 🙂 !
    I just noticed that when I enable “Display author” in the settings,
   it always shows the same author for all posts, even though some are from other
   authors.
 * Meaning: when I go to “Users –> all users” and click on the number in the “Posts”
   column, I get all the posts from the author in that row. Plus I get to see the
   individual autor IDs there.
    That’s how I know for sure that WordPress itself
   internally lists those posts under different authors, but the plugin “ignores”
   that info (or maybe gets the author info from another source).
 * Background:
    I use polylang, where one language is written by one author, and
   the translations by another. As I just explained, WordPress has no issue distinguishing
   those posts. Also other plugins which offer a “selection by author” (for example“
   Recent posts widget”) are able to pull the correct posts by the selected author
   without problems.
 * How can I make this work with this plugin?
 * Thanks for your help :)!
    best, Flow

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10883841)
 * Hi [@rhisflow](https://wordpress.org/support/users/rhisflow/),
 * The plugin is returning the author of the “original” post. I guess it would make
   more sense if WPP displayed the actual author of each post instead, as you mentioned.
 * I’ll have that fixed on the next release. Thanks for reporting!
 *  Thread Starter [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * (@rhisflow)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10884190)
 * Hi Hector,
 * wow, that is a response I did not expect, what a nice surprise 🙂 !
    You’ll have
   that fixed in the next release, that’s awesome! Just out of curiosity (there 
   is no rush whatsoever), what do you guess in terms of time frame?
 * Thanks!
    best wishes, Flow
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10884308)
 * Ideally, I’d like to release version 4.2.1 before WordPress 5.0 is out ([November 27th](https://make.wordpress.org/core/2018/11/09/update-on-5-0-release-schedule/),
   at the time of writing). That is **if** I find the time to work on it (hopefully,
   I will).
 *  Thread Starter [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * (@rhisflow)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10959070)
 * Hector,
 * you updated the plugin as promised, that’s awesome, thanks!
    The actual author
   of each post is now correctly displayed.
 * However, I noticed another issue related to this:
 * The internal counter which keeps track of how many times a post has been read
   always seems to attribute everything to the original author, not the actual.
 * Example:
    Original author John writes the post “English post”. Then Jane translates
   that post to German, calling it “German post” (which has it’s own URL slug “…/
   de/…”)
 * Now when someone opens the english post, that one gets bumped up by 1 within 
   the stat counter.
    However, if the German version of that post gets requested,
   the english one gets another bump, and the German post never even makes it into
   the statistics.
 * But this would be crucial in order to display the most popular posts per language.
 * Do you think you could fix this?
 * Let me know if I didn’t explain it well.
 * Thanks so much 🙂 !
 * best,
    Flow
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10959418)
 * Hey there,
 * This is a subject that has been long debated over the years, actually. [Here’s my latest official standing answer](https://github.com/cabrerahector/wordpress-popular-posts/issues/102).
 * In short: it’s not a bug. It’s the intended behavior so there’s nothing to be
   fixed.
 * Note that that GitHub issue is still open because while I believe that the current
   behavior is the right one I also agree that having separate views count per language
   would also be a nice thing to have. Thing is, this would require changing the
   BD table structure so the plugin can track views per language, and changing the
   DB table structure has been historically a painful process for users (and for
   me as well):
    - Unfortunately, [not everyone is using the latest and greatest version of the plugin](https://wordpress.org/plugins/wordpress-popular-posts/advanced/)
      which makes handling updates from older versions a PITA (eg. someone upgrades
      from an ancient version of the plugin to the latest one, skipping _N_ previous
      upgrades checks in the process which might break things for them).
    - Some hosting providers are very restrictive: in the few times I’ve had to 
      change the DB table structure, I’ve seen some cases where the plugin has failed
      to do so simply because the hosting provider didn’t grant the user permissions
      to modify database tables. There were even a couple of cases where users could
      create tables but not change them nor delete them, which is crazy. My only
      suggestion to these users was “please, move your site to another hosting provider.”
    - Some users will actually prefer the current behavior since that’s the way 
      the plugin has been handling views count from the start. Changing that might
      cause some ruckus.
    - There’s also the fact that not everyone that uses WPP also uses a multilingual
      plugin.
 * It’s not a fun choice to make, as you can probably tell.
 * Again, I might change my posture and have WPP track views count per language 
   one day. For the time being, it is what it is.
 *  Thread Starter [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * (@rhisflow)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10959784)
 * Hi Hector,
 * thanks for your quick and comprehensive reply.
    Of course I absolutely respect
   your decision to not change anything about the table structure. Is there at least
   a workable solution to return the post title in an alternative language? So I’m
   thinking while the DB table might keep on tracking the original post as you explained–
   after retrieving that as the most popular one, can a filter check if that post
   has a translation? So there would be no need to change anything at the DB level,
   while still avoiding foreign language posts on other languages of the same site.
   You know what I mean?
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10960658)
 * > You know what I mean?
 * Yes, and that’s an entirely different matter than what we were discussing just
   before. I was a bit confused for a second there 😛
 * No, currently there’s no way to exclude untranslated posts from the listing. 
   WordPress Popular Posts expects all popular posts to be translated, as mentioned
   in the [Description](https://wordpress.org/plugins/wordpress-popular-posts/) 
   page:
 * > Show the translated version of your popular posts!
 * If a given post doesn’t have a translation WPP will display the original one 
   instead, which brings us back to my position regarding the matter:
 * > (…) some people out there are (mis)using multilingual plugins to be able to
   > have two “separate” sites without having to set up a multisite network or a
   > separate single WordPress setup for each language.
 * I could add an option/filter hook to exclude untranslated posts from the listing
   but that’s not a priority at the moment.
    -  This reply was modified 7 years, 6 months ago by [Hector Cabrera](https://wordpress.org/support/users/hcabrera/).
      Reason: Improved wording
 *  Thread Starter [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * (@rhisflow)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10963121)
 * Hi Hector,
 * I think I didn’t explain myself well.
 * > No, currently there’s no way to exclude untranslated posts from the listing.
 * I wasn’t talking about excluding anything.
    But maybe I’m misunderstanding the
   functionality of the plugin completely. Let’s take my example from before:
 * > Original author John writes the post “English post”.
   >  Then Jane translates 
   > that post to German, calling it “German post” (which has it’s own URL slug “…/
   > de/…”)
 * Let’s assume that the English version get’s read 9 times, and the German version
   1 time.
    In the stat counter of WPP, the plugin will attribute 10 times to the
   English version. So far, this is fine with me and I’m in line with your reasoning
   that this is sound logic, as this post is in fact the most popular, regardless
   of its language version.
 * Now, here is where my misunderstanding might come in:
 * How can I display the translated versions of this post to readers who are on 
   the German version of the site?
    Let’s say I implement the plugin on the homepage
   to display the most popular posts. So there is the “homepage.com” version in 
   English and the “homepage.com/de” in German.
 * All I’d like to achieve is display the translated version of that popular post
   to the correct audience, and not show the English title of it to readers of the
   German site.
 * Does this make sense?
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10963612)
 * > Does this make sense?
 * Yep, thanks for clarifying.
 * You shouldn’t need to do anything. The WPP widget automatically translates the
   posts to the currently active language. If that’s not happening in your case 
   then I’ll need more details so I can help you debug the issue (are you using 
   the WPP widget, or the [wpp] shortcode, or the wpp_get_mostpopular() template
   tag? What other plugins are installed on your site? Etc etc)
 * Note that I tested the plugin with Polylang to fix the author issue you reported
   and for me the plugin did translate all posts to the secondary language as expected,
   so you’re clearly doing something differently.
 *  Thread Starter [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * (@rhisflow)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10964831)
 * I just tested it and it works like you said it would!
    I got confused because
   some foreign languages showed up among the translated ones, but that is because
   there’s no translation for those yet.
 * So everything works like a charm, thanks 🙂 !

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Plugin not pulling correct author’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [rhisflow](https://wordpress.org/support/users/rhisflow/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-not-pulling-correct-author/#post-10964831)
 * Status: resolved