Title: [Plugin: WordPress Popular Posts] All time -&gt; average daily views problem
Last modified: August 20, 2016

---

# [Plugin: WordPress Popular Posts] All time -> average daily views problem

 *  [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/)
 * Hey there!
    This plugin works perfect for me on my site, I’ve been running it
   for almost a year now and I’m very happy with it, except for one thing!
 * When I try to change the settings to display **all time** combined with **average
   daily views**, the message _Sorry. No data so far._ displays.
 * It works like a charm with **all time** combined with **total views**. All other
   combinations seems to work as it should as well (Last 30 days + Average daily
   views etc…)
 * The site in question is [http://webbhjalp.se](http://webbhjalp.se) (in Swedish,
   top 6 popular posts on the right, at the moment last 30 days + average daily 
   views.)
 * Any idea what the problem might be?
 * Thanks for a great plugin!
 * // Jens.
 * [http://wordpress.org/extend/plugins/wordpress-popular-posts/](http://wordpress.org/extend/plugins/wordpress-popular-posts/)

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/page/2/?output_format=md)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305192)
 * Hi Jens,
 * Sorry for the long delay. I’ll be taking a look a this and report back and/or
   push a plugin update if necessary as soon as I can. It’s been a while since I
   last took a look at WPP’s code so it might take sometime for me to fix whatever
   needs some fixing.
 * Thanks for stopping by!
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305193)
 * Thanks Héctor for your reply!
    I’m looking forward to hear about the solution!
 * Take care!
    // Jens.
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305203)
 * Hey again Héctor,
    I just updated to the latest version of your plugin, and unfortunately
   now the thumbnails wont show in bigger size than like 20pixels or something anymore.
   I had them customized to be bigger.
 * See the sidebar of [http://webbhjalp.se](http://webbhjalp.se)
 * Thanks!
 * // Jens.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305204)
 * Hi Jens,
 * That’s not a bug. A few days back, the WordPress Team warned me that my plugin(
   and others as well, I suspect) was causing security issues to many blogs around
   because of the TimThumb script. This is a third-party php script my plugin was
   using to create thumbnails, however it appears that someone found a flaw and 
   exploited it which is why I had to remove it.
 * My plugin now relies on WordPress’ Post Thumbnail feature (a.k.a. Featured Image)
   to let the users select their own thumbnails. Bad news is you’ll have to select
   a featured image for all your popular posts, but first you’ll need to add this
   two lines of code to your theme’s functions.php file:
 *     ```
       // Enable post thumbnails
       add_theme_support('post-thumbnails');
       set_post_thumbnail_size(width, height, true);
       ```
   
 * … where _width_ and _height_ are the dimensions of your thumbnails. For example:
 *     ```
       // Enable post thumbnails
       add_theme_support('post-thumbnails');
       set_post_thumbnail_size(80, 80, true);
       ```
   
 * I know this is annoying, so my apologies for the troubles caused.
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305205)
 * Hey Héctor,
    that’s no problem, I already use that function on all my blog posts.
   The problem is, the plugin seems to resize the images, they are not being displayed
   the size they actually are…
 * // Jens.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305206)
 * Mmm I think I know what the problem is. Please open wordpress-popular-posts.php,
   find this code (around line 717):
 * `$thumb = "<a href=\"".get_permalink($wppost->ID)."\" title=\"". $title_attr ."\"
   >" . get_the_post_thumbnail($wppost->ID, array($tbWidth), array('class' => 'wpp-
   thumbnail', 'alt' => $title_attr, 'title' => $title_attr) ) ."</a> <!-- $tbWidth
   $tbHeight-->";`
 * … and change it for:
 * `$thumb = "<a href=\"".get_permalink($wppost->ID)."\" title=\"". $title_attr ."\"
   >" . get_the_post_thumbnail($wppost->ID, 'thumbnail', array('class' => 'wpp-thumbnail','
   alt' => $title_attr, 'title' => $title_attr) ) ."</a>";`
 * Let me know if it fixes your thumbnail issue, please.
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305207)
 * Thanks, that did the trick! 🙂
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305208)
 * Good, I’ll be sure to include this patch on the next release. Thanks for pointing
   that out!
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305209)
 * No problem! Thanks for a great plugin and for your help!
    // Jens.
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305210)
 * (I’m not changing to resolved, since my original question isn’t resolved yet)
 *  [cookieandkate](https://wordpress.org/support/users/cookieandkate/)
 * (@cookieandkate)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305223)
 * Hi, I tried to add a link underneath my thumbnail list, only to find that my 
   thumbnails shrunk from 108 pixel squares to 15 pixel squares after I updated 
   my plugin settings.
 * Then I implemented both code changes suggested above. I specified 108×108 pixels
   for my thumbnail image in my functions.php. While that did make the image bigger
   than 15×15 pixels like it was before, the images resized to 135×135 pixels, which
   is the size specified for thumbnails in my media settings. I don’t want to change
   that size under media settings because 135×135 is the correct size for other 
   thumbnails on my site.
 * Had I known that trying to tweak the plugin this morning would cause so much 
   trouble, I wouldn’t have messed with it at all. Now it looks all wrong and I 
   have spent over thirty minutes trying to fix it. 🙁
 * If you don’t have a solution, do you know when you will have an update for the
   plugin? I absolutely loved the way it looked before and would hate to remove 
   it altogether for now.
 * Thank you,
    Kate
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305224)
 * Hey Kate,
    you should be able to add a custom sized thumbnail to your functions.
   php file, and then specify it in the plugin.
 * Add this to your functions.php file:
 * `add_image_size( 'popular-thumbnail', 108, 108, true );`
 * And then change this in your plugin file:
 * `$thumb = "<a href=\"".get_permalink($wppost->ID)."\" title=\"". $title_attr ."\"
   >" . get_the_post_thumbnail($wppost->ID, 'thumbnail', array('class' => 'wpp-thumbnail','
   alt' => $title_attr, 'title' => $title_attr) ) ."</a>";`
 * To this:
 * `$thumb = "<a href=\"".get_permalink($wppost->ID)."\" title=\"". $title_attr ."\"
   >" . get_the_post_thumbnail($wppost->ID, 'popular-thumbnail', array('class' =
   > 'wpp-thumbnail', 'alt' => $title_attr, 'title' => $title_attr) ) ."</a>";`
 *  [cookieandkate](https://wordpress.org/support/users/cookieandkate/)
 * (@cookieandkate)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305225)
 * Thank you so much for your help, Jens! I implemented your changes and they almost
   work just right, except that my images are no longer cropped into a square. So
   my horizontal images are 108 pixels high by 72 pixels wide, and my vertical images
   are the opposite! It’s producing a collage-like effect in my sidebar: [http://cookieandkate.com](http://cookieandkate.com).
   Do you happen to know how to fix that?
 *  Thread Starter [jenseo](https://wordpress.org/support/users/jenseo/)
 * (@jenseo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305226)
 * Just out of curiosity, what happens if you upload a new picture? It might be 
   that you need to re-upload your pictures, since this only will apply to new pictures,
   not the ones already uploaded.
 * There’s a plugin that does this automatically, so you don’t need to manually 
   upload all pictures again, but first, try it by uploading a new picture to one
   of your popular posts.
 * [http://wordpress.org/extend/plugins/regenerate-thumbnails/](http://wordpress.org/extend/plugins/regenerate-thumbnails/)
 * // Jens.
 *  [cookieandkate](https://wordpress.org/support/users/cookieandkate/)
 * (@cookieandkate)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/#post-2305228)
 * Thank you, Jens! I just re-uploaded each of the six featured images, cleared 
   my cache, and it worked. I doubt that an older post will appear in the popular
   posts section, but I’ll keep an eye out for it and re-upload the featured image
   for those posts if necessary. Thank you so much for helping me resolve this issue!

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/page/2/?output_format=md)

The topic ‘[Plugin: WordPress Popular Posts] All time -> average daily views problem’
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/)

 * 30 replies
 * 5 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-all-time-average-daily-views-problem/page/2/#post-2305414)
 * Status: not resolved