10 Mar, 2010  |  Written by  |  under WordPress

If you add a page views counter on your blog for your posts and pages then you can increase the page views on your blog, people are curious, they like to know what are the most readable articles, what type of articles that people like to read? This will definitely improve the page views on your blog.

Adding a page views counter on your blog will encourage your blog visitors to stay more time on your blog, and also will encourage them to read more articles, people will view more pages on your blog!

You can also increase the page views on your blog by adding some widgets to your theme Viagra o levitra sidebar like; Most Viewed Posts widget, Least Viewed Posts widget, Least Viewed Posts For A Category widget etc.

How I can add a page views counter on my blog posts and pages?


You can add a page views counter by installing “WP-POSTVIEWS” Plugin.

Buy Clomid Online Pharmacy No Prescription Needed href=”http://wordpress.org/extend/plugins/wp-postviews/” target=”_self”>Click here to download WP-POSTVIEWS plugin.

After coversyl you download and install the plugin on your Wordpres blog, then go to settings>Post-Views>> then change the settings according to your preference.

Now to display the page views counter on your blog you have to add the page views counter template tag code inside the loop.

You can add the page views counter on your blog home page, or in the single post page (single.php), archives or in the categories archive.

Now we are going to add the page views counter on the home page, and the best place to add the page views counter is under the title of the posts on your blog home page.

Go to your theme folder and then open the file “index.php” to edit on it (I prefer to use Notepade++ program), or you can edit on the index.php file directly from your WP admin control panel by clicking on Appearance>Editor> and then choose the “index.php” file of your theme.

To add the page views counter under the title of the posts on your blog home page, first you have to look for the title template tag code Order viagra and then you should paste the page views counter after the title template tag code.

The template tag code of the title: <?php the_title(); ?>”><?php the_title(); ?>

Look at the screenshot below.

Index.php File screenshot:

title template tag code in index.php fileLevitra pills height=”190″ />

As you can see in the screenshot above the title template tag is (<?php the_title(); ?>”><?php the_title(); ?>) and it’s inside the loop, so you should paste the page views counter inside the loop after the title template tag code, but you have to add it after where the title template tag ends and here it ends after the </a></h2> tags.

Copy the page views counter template tag code: <?php if(function_exists(‘the_views’)) { the_views(); } ?>

How to add the page views counter template tag screenshot:

page views counter template tag code in index.php file

Then paste the page views counter template tag after the title template tag code like how I did it in the screenshot above and then save your changes. Vardenafil levitra

After you paste the page views counter template tag in the index.php file, then you should see this in your blog home page:

My blog home page screenshot:

page views counter in my blog home page

Buy Cialis Online style=”color: #000000;”>As you can see in the screenshot above, I have successfully added the page views counter under the title of my post, and you see in the screenshot above that i have “0 views” and you see this because I have just added the counter and the counter still didn’t counted any visits.

If you want to add the counter in another page in your blog like: in the archive.php page, single.php, post.php or page.php, you can simply follow the same previous steps.

If you want to add more functions, like if you want to add widgets please visit this link.


One last thing that you should do now, if you don’t want to count your own visits on your blog then you should change the settings of the plugin to set the count views just from the visitors and to do this please follow these steps:

Go to your WP admin control panel and then click on Settings>PostViews, then you will be taken to the Post Views plugin page.

Post Views plugin page screenshot:

post views plugin page screenshot

In the post views plugin page, choose “Guest Only” from the “Count Views From” form and then save the changes.

That’s it, if you have any questions feel free to ask me and please if you liked this article share it with your family and friends.

Related Posts

2 Responses so far | Have Your Say!

  1. dlapree  |  April 1st, 2010 at 1:29 am #

    One of my friends already told me about this place and I do not regret that I found this article.

    dlapree - Gravatar
  2. SteveC  |  April 15th, 2010 at 10:20 pm #

    I’m looking forward to getting more information about this topic, don’t worry about negative opinions.

    SteveC - Gravatar