WP-PostViews

One of the plugins I want to add to the blogs is WP-PostViews, this one shows the page view counts on the title index and single pages. The set up is pretty straight forward, although we have to edit the index.php and single.php of our theme. We can download WP-PostViews from the plugins page or just use the add plugins from the admin page. We used the admin page.

get wp-postviews plugin wp-postviews installation

activate plugin wp-postviews

wp-postviews settings default edit index.php

edit single.php

add codes in page.php

The codes that we need to add in the index.php (to display at the main page) and the single.php (to display at single page) and page.php after the “category”, before “edit” are below.

<?php the_views() ; ?>

If everything is done correctly, we should have the views displayed on both main page and single page after the title.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.