Popular Post Plugin
This plugin will display popular post in your sidebars, or anywhere where you want to put this plugin. The popular post will be determined by pageviews.
This plugin would work easier for those who will use it dynamically with the widget in the admin panel. If you want to include this somewhere else other than the sidebar of the template, you can still do it. I have added a very useful article to Balkhis which shows How to add Dynamic Sidebar in wordpress. Basically follow that tutorial, if you want to display it in some other place than your sidebar, but want to use the widget area in the admin panel. All what you would have to do is paste the last code discussed in that tutorial anywhere on the template for instance footer or whatnot.
Once you have done that,
Download the plugin
Upload the plugin, Activate it.
Go to your Themes section and click on the sub menu that says Widgets.
Add this widget into your selected sidebar, and customize it. You are good to go.
Now If you don’t have any issues with codes and can edit those very well, than you can also take the approach of doing it simply the codes way rather than the widget way.
You can display this code anywhere in your template:
KSD?php if (function_exists(’WPPP_show_popular_posts’)) WPPP_show_popular_posts(); ?KSB
This is just a basic code that will show popular post. You would still have to download and activate the plugin.
You can also add multiple parameters to make your plugin customized.
title (title of the widget, you can add tags (e.g. KSDh3KSBPopular PostsKSD/h3KSB) default: Popular Posts)
number (number of links shown, default: 5)
days (length of the time frame of the stats, default 0, i.e. infinite)
show (can be: both, posts, pages; default both)
format (the format of the links shown, default: KSDa href=’%post_permalink%’ title=’%post_title%’KSB%post_title%KSD/aKSB)
For the format there are more variables also.
%post_permalink% the link to the post
%post_title% the title the post
%post_title_attribute% the title of the post; use this in attributes, e.g. KSDa title=’%post_title_attribute%’…
%post_views% number of views
(source content)
This plugin will display popular post in your sidebars, or anywhere where you want to put this plugin. The popular post will be determined by pageviews.
This plugin would work easier for those who will use it dynamically with the widget in the admin panel. If you want to include this somewhere else other than the sidebar of the template, you can still do it. I have added a very useful article to Balkhis which shows How to add Dynamic Sidebar in wordpress. Basically follow that tutorial, if you want to display it in some other place than your sidebar, but want to use the widget area in the admin panel. All what you would have to do is paste the last code discussed in that tutorial anywhere on the template for instance footer or whatnot.
Once you have done that,
Download the plugin
Upload the plugin, Activate it.
Go to your Themes section and click on the sub menu that says Widgets.
Add this widget into your selected sidebar, and customize it. You are good to go.
Now If you don’t have any issues with codes and can edit those very well, than you can also take the approach of doing it simply the codes way rather than the widget way.
You can display this code anywhere in your template:
KSD?php if (function_exists(’WPPP_show_popular_posts’)) WPPP_show_popular_posts(); ?KSB
This is just a basic code that will show popular post. You would still have to download and activate the plugin.
You can also add multiple parameters to make your plugin customized.
title (title of the widget, you can add tags (e.g. KSDh3KSBPopular PostsKSD/h3KSB) default: Popular Posts)
number (number of links shown, default: 5)
days (length of the time frame of the stats, default 0, i.e. infinite)
show (can be: both, posts, pages; default both)
format (the format of the links shown, default: KSDa href=’%post_permalink%’ title=’%post_title%’KSB%post_title%KSD/aKSB)
For the format there are more variables also.
%post_permalink% the link to the post
%post_title% the title the post
%post_title_attribute% the title of the post; use this in attributes, e.g. KSDa title=’%post_title_attribute%’…
%post_views% number of views
(source content)
Comments