Hi @sean-h!
(…) it is displaying the same posts both in English and Dutch
Yep, that’s the expected behavior actually.
From plugin’s Description page:
Polylang & WPML 3.2+ support – Show the translated version of your popular posts!
WPP won’t track views by language.
or is it just displaying the most popular post on the site regardless of language?
Close enough, but yeah that’s one way to put it as well.
Thread Starter
Sean
(@sean-h)
Hi @hcabrera,
Thanks for clarifying, we can live with that. I seem to remember asking this a while ago when we first installed the plugin but forgot the answer.
But while we’re on the subject, is there a way to configure the plugin to track and display popular posts per language? or would that be really complicated to make happen?
Well, there’s currently no way to have WPP track views on a per language basis. At least not without making some substantial modifications to the plugin: we’d likely need to modify WPP’s database tables so the plugin knows which views data belong to which version of the article (language wise).
Plus, making such a change would probably upset users who do want the existing behavior and so it’s not something I can do thoughtlessly. In that case having a toggle-able option that enables one or the other behavior sounds like the obvious desirable choice, but then what do we do about the views data that’s already on the database? I’d need to implement some sort of migration process to sort that out.
And then we have users who may switch between the two behaviors (storing views data as a single entity for all versions of an article vs storing views individually) just for “the fun of it” or to “experiment” which is another kind of problem on its own, the plugin would need to be smart enough to save these users from themselves while keeping data consistent.
Can you see why I’d rather keep the existing behavior? 😛 That doesn’t mean that I’m not open to reconsider it, it’s just that right now it’s not something that I’d like to nor can work on (being a full-time developer working for a company another limitation to take into account as well).
Thread Starter
Sean
(@sean-h)
Hi @hcabrera,
That makes complete sense. I’m not a coder, yet (I’m considering studying php though) but I can definitely appreciate the work needed for such a ‘feature’.
This would probably also make it a premium feature which I’m not entirely sure people other than me actually need/want, you would need a substantial amount of requests for it first. So, maybe lets not change anything just yet 🙂
-
This reply was modified 3 years, 10 months ago by
Sean.
To be honest you’re not the first person to ask about this but yeah not a lot of people have expressed interest in this so far either. Might be a good idea for a Pro version of the plugin, if it ever exists, so thanks for the suggestion.
And since you mentioned it, if you want to learn PHP my advice would be -hope you don’t mind- to start with Laravel. It’s a very well-known PHP framework that follows modern PHP practices. It can be a bit daunting at first, especially if you’re not familiar with PHP, but trust me when I say that you’ll love it once you get the hang of it @sean-h. At least that has been my own experience with it so far. Laravel helps you write clean, reusable code and that’s something that will prove valuable in the long run.
WordPress is great, too, but it’s a bit far behind when it comes to current development practices (they’re working on it though!)
Oh, and speaking of clean, reusable code: make sure to learn the SOLID principles first. Carl Alexander has a couple of nice articles about it that are worth checking out (this is not a paid promotion, I genuinely think the guy’s a great developer).
P.S.: Sorry, I got a bit carried away.
Thread Starter
Sean
(@sean-h)
Very useful info, thanks! It was a bit of a side note me mentioning it in the first place, but you have pointed me in a direction, because up until now I’m still not entirely sure which way to go. I’ve been hobby blogging for years now, but I think it’s time to take it to the next level, and actually earn something from all this. Maybe I could even write/modify plugins myself. Digital nomads are quite the thing in recent times so I’m basically looking for portable work.
So yea, you’ve given me some food for thought. Thanks again 🙂