March 27th, 2007

WordPress Plugin: Daily Top 10 Posts

If you want to know how much hits your posts are receiving on a daily basis, then the Daily Top 10 Posts plugin is for you. What it does is track the hits of each blog post for the current day and cumulatively at the same time. You may also display sidebar widgets containing a list of the most popular posts for the day and most popular posts overall.

Plugin Name: Daily Top 10 Posts
Description: Tracks the number of pageviews per blog post for the current day and cumulatively with options to display sidebar widgets for both.
Author: Andrew dela Serna
Version: 0.7
Notice: Compatible with WordPress 2.7-2.8.
Disclaimer: This is a standalone plugin. If you have been using the Top 10 plugin, please be advised that using the Daily Top 10 Posts plugin means your pageviews will start from zilch.

INSTALLATION
————
1A. WordPress 2.7-2.8 users, download the plugin from http://www.alleba.com/blog/wp-downloads/dailytop10.zip
1B. WordPress 2.6 and below users, download the plugin from http://www.alleba.com/blog/wp-downloads/dailytop10.zip
2. Extract and upload dailytop10.php to 'yourserver.com/wp-content/plugins/'
3. Login to your WordPress admin panel and browse to the Plugins section.
4. Activate The Daily Top 10 Posts plugin.

INSTRUCTIONS
————
1. Go to Admin Panel > Design > Theme Editor and click on Single Post (single.php).

#Find this line:

<?php the_time('F jS, Y') ?> //date

#Right after it, insert this line:
<br /><?php if (function_exists('todays_overall_count')) { todays_overall_count($post->ID, 'Visited', 'times', 'so far today', '0', 'show'); } ?>

#The line will display something like “Visited 300 times, 25 so far today” while viewing an individual post.
#You may edit the wording to suit your preference.
#If you wish to leave a word/phrase empty, use two quotes '' instead of just leaving it completely blank.
#Insert only one instance of this line to avoid double tracking.
#Change '0' to '1' if you wish to track unique sessions.
#Change 'show' to 'noshow' if you donot wish to display the post count information.

2. To display the number of views per post on the main index page, click on Main Index Template (index.php) in the Theme Editor panel.

#Find this line:

<?php the_time('F jS, Y') ?>

#Right after it, insert this line:

<br /><?php if (function_exists('todays_overall_main')) { todays_overall_main($post->ID, 'Viewed', 'times', 'so far today'); } ?>

#The line will display something like “Visited 300 times, 25 so far today” under each post heading
#while browsing your main page.
#You may edit the wording to suit your preference.
#If you wish to leave a word/phrase empty, use two quotes '' instead of just leaving it completely blank.

3. To add the sidebar widget, you may add it directly in the widgets panel of your theme (Design > Widgets). If your theme is not widget-ready, click on sidebar.php in the Theme Editor panel and do the following:

#Add the following code:

<h3>Top Posts for Today</h3>
<?php if (function_exists('todays_count_widget')) { todays_count_widget('views', 'ul'); }?>

#You may edit the word “views” to your liking (e.g. visits, pageviews or leave it empty '').
#The list format defaults to an unordered list (ul). If you would like an ordered list, change it to 'ol'.

4. To add the sidebar widget to show your most popular posts overall, you may add it directly in the widgets panel of your theme (Design > Widgets). If your theme is not widget-ready, click on sidebar.php in the Theme Editor panel and do the following:
#Add the following code:

<h3>Overall Top Posts</h3>
<?php if (function_exists('todays_overall_count_widget')) { todays_overall_count_widget('views', 'ul'); } ?>

#You may edit the word “views” to your liking (e.g. visits, pageviews or leave it empty '').
#The list format defaults to an unordered list (ul). If you would like an ordered list, change it to 'ol'.

Update: Now has the ability to track unique hits based on sessions. See instruction #1 for implementation.

0.2 Update: A serious flaw has been found that prevents the daily count from incrementing. Please download the latest version to correct this.

0.3 Update: Numerous bugs corrected. For more, read this post.

0.4 Update: Numerous bugs corrected. Added support for widgets. For more, read this post.

0.5 Update: Bugs in WordPress 2.7 corrected. Check this post.

0.6 Update: CSS bugs in WordPress 2.7 corrected. Check this post.

0.7 Update: Ability to exclude posts added. Tested to work on WordPress 2.8 Check this post.

As always, I am open to your comments and suggestions. I hope you like this one! Thanks!

Posted in Wordpress Plugins


  1. 276 Comments

  2. Jenggirat said...

    Hey Allabe, your Plugins is really great you know that ?? I like it thx ..

    Regard,

    Nov 4, 2010

  3. Cerita Dewasa said...

    Nice plugin,

    I use this plugin on my site. Can you tell me how to change “Top post of the Day” for display on sidebar for 5 post?

    Nov 19, 2010

  4. C. Enrique Ortiz said...

    any idea the time of the blog (which affects the count for the day) seems off with respect to current time? the wordpress timezone is correct. ideas?

    Nov 19, 2010

  5. Aron said...

    Hi Andrew, I love the plugin, but is there a way to get rid of the post count for ‘today’?

    All I would like it to say is “VIEWED POST 100”

    Thanks so much

    Aron

    Dec 29, 2010

  6. Katter said...

    Really good plugin, thanks mate!

    Feb 7, 2011

  7. jehzlau said...

    koya, di na gumagana tong Daily top 10 plugin.. weird. Biglaan nalang O_O.

    pero nag wowork naman sya inside wp-admin. O_O

    Jul 19, 2011

  8. MihaiC said...

    Is possible to show image from article and title toghether?
    Thank you

    Feb 22, 2012

  9. Darell said...

    I wouldn’t say much better!

    Nov 2, 2012


  1. 18 Trackbacks

  2. 237 Excelentes Plugins para WordPress. | GeeksRoom

    Nov 7, 2010

  3. 翼度空间 » 很强大的78个Wordpress插件

    Nov 21, 2010

  4. Los mejores plugins de Wordpress | Comunidad Search

    Nov 24, 2010

  5. Anonymous

    Nov 29, 2010

  6. بلاگ نوشت – نسخه Digital Statement | بلاگ‌نوشت

    Feb 18, 2011

  7. Los mejores 120 plugins para Wordpress | DESCARGAR GRATIS ESPAÑOL

    Mar 8, 2011

  8. Los 72 mejores plugins wordpress para facilitarte la vida | Blog and Web | Compra venta de negocios, dominios tiendas online, liberacion de telefonia y video consolas

    Apr 25, 2011

  9. 72 De Los Mejores Plugins Para WordPress | MetodosGraficos

    May 3, 2011

  10. 50 plug in WordPress | Le grenier pouchet

    May 30, 2011

  11. 40 top meilleur plugins thèmes wordpress | Thèmes et Référencement de votre blog wordpress

    Jul 12, 2011

  12. 40 top meilleur plugins thèmes wordpress, top wordpress plugins, top wordpress thème | YaLiPo

    Jul 12, 2011

  13. El “top pluging” de Wordpress : Daniel Vega

    Jul 21, 2011

  14. Plugins para las Entradas - Wordpress

    Jul 22, 2011

  15. Los 72 mejores plugins segun “Blog and Web”

    Aug 25, 2011

  16. 7Maximes-news for designers and Web developers

    Sep 5, 2011

  17. Plugins para Wordpress – computación + multimedia

    Sep 15, 2011

  18. Plugins para WordpressEl Blog de Negu

    Nov 8, 2012

  19. Los 262 mejores plugins para wordpress

    Nov 22, 2012

Post a Comment


six − = 2