Unusual Issue with wpp_get_mostpopular
-
So I came across an unusual issue. I’m not sure exactly when it started occurring as it’s a part of the site that I don’t look at much.
On post pages (single.php) I use this to pull the most popular 6 articles for the past week:
<?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=weekly&limit=6&order_by=views"); ?>
Recently, I noticed that this wasn’t pulling the most popular articles, in fact it seemed to be pulling articles from a couple of weeks earlier. Which is odd since I use the same sort of code on my front page, where it works just fine.
What I found is that if I use limit=4, limit=5 or limit=7 etc. then the output is correct, but for some reason if I use limit=6 then it outputs much earlier news. I can’t for the life of me figure out why it would be doing that. Obviously, for now at least, I’ve just decreased the output limit to 5.
- The topic ‘Unusual Issue with wpp_get_mostpopular’ is closed to new replies.