This post has been viewed 9636 times since Wednesday 6 July 2005 @ 6:53 pm
Ok, as promise to a blog buddy of mine, Kah Soon, that I will share a small plugin to show the post count in each for the the article as shown in the picture below.
Please follow the steps:-
- 1. Download Top10 plugin for Wordpress.
- 2. Login to your database, either through phpMyAdmin or telnet.
Create a table called mostAccessed, by using this SQL query:-
[sql]create table mostAccessed
(
postnumber int not null,
cntaccess int not null,
primary key(postnumber),
unique id(postnumber)
);[/sql] - 3. Find this line to your index.php:-
[php]
< ?php if (have_posts()) : while (have_posts()) : the_post(); ?>
[/php]
Then add the following code below the line:-
[php]< ?php if ($id > 0) { add_count($id); } ?>[/php] - 4. Look for this line in index.php too:-
[php]< ?php the_title(); ?>[/php]
Then, add the following code below the line:-
[php]< ?php if (!( is_home() || is_page() )) { ?>
< ?php show_post_count($post->ID,
$before=”This post has been viewed “,
$after=” times since “); ?>
< ?php } ?>[/php] - That’s it.

The post count will appear whenever the single page of the article is shown.
Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post
Best Deal Ads :
Recent Posts :
AMD Allowed To See Third-Party DocumentsPalmSource To Use Linux Soon
Google Is Gonna Take Over The Web
IE Bug Might Crash Browser
IBM Wins USD$850 Million From Microsoft
Latest Motorola Linux Phone - E895
Sign Board Creator
Opera Now Runs On Windows Mobile 2003 Smartphone
Guide To Use HijackThis
AMD Takes CPU War To Japan
Related Posts :
WordPress 1.5.1.3
Dear all WordPress users, Here comes another WordPress update, WordPress 1.5.1.3. Directly...
Submit It Wordpress Plugin
Hi all, Just giving you all a brief introduction of my...
Wordpress 1.5.1.1 Available
Just after 10 days of new Wordpress 1.5.1 been released,...
My First Ever Wordpress Plugin - Submit It Plugin
Hi everyone, I'm so glad I finished my first ever Wordpress...
Upgrade To WordPress 1.5.2
The latest version of Wordpress 1.5.2 is already released. According...
















Hey Kah Soon,
You actually have already downloaded the plugin and left a “very nice!” comment there. LoL
Anyway, hope my tutorial helps.
Why everyone WP, WP leh. I use 2 MTs and one WP (neglected blog). My MT can do spam control like yours or not ha? ‘Cos spam is killing me even with MT blacklist. BTW, I link you as Bryan ah?
Hi Lilian,
Yup, I’m bryan.
ErrR… Why WP ah? Because I’m using it mah. I have already been using WP since the beginning and this is my first ever blog.
This spam control is a nice plugin written by some really nice guy. Don’t know any nice guy using MT is willing to write a similar one. Anyway, before I used this spam control, I held every commment for moderation before been posted. But moderating thousand of spam is quite irritating.
Spam problem is going rampant these days, sigh…
Thank for making this valuable information available to the public.