How to show WordPress post view count

WordPress post view count

I would like to show number of reads in WordPress posts (in the home page). But there are very less themes which has the same feature. I s any plugin required for that ?

Several WordPress plugins available to show post views or count.

They are,

WP-PostViews WordPress plugin
Just configure this plugin via Admin -> Settings -> PostViews

Find this line

<?php while (have_posts()) : the_post(); ?>

in your WordPress theme template file.
Add this line

 <?php if(function_exists('the_views')) { the_views(); } ?>

after above code to show the counter.

Another good plugins are.

Simple Post view counter
Best plugin to display how many times a post has been viewed.

Jetpack post views
show post views in your sidebar widget.

These are free WordPress plugins.

Alter Way ( Display post views without plugin)
Add this code in your theme function.php file

function getPostViews($postID){
	$count_key = 'post_views_count';
	$count = get_post_meta($postID, $count_key, true);
	if($count==''){
		delete_post_meta($postID, $count_key);
		add_post_meta($postID, $count_key, '0');
		return "0 View";
	}
	return $count.' Views';
}
function setPostViews($postID) {
	$count_key = 'post_views_count';
	$count = get_post_meta($postID, $count_key, true);
	if($count==''){
		$count = 0;
		delete_post_meta($postID, $count_key);
		add_post_meta($postID, $count_key, '0');
	}else{
		$count++;
		update_post_meta($postID, $count_key, $count);
	}
}
// Remove issues with prefetching adding extra views
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);

Next you need to setup post view count. Just place this code below within the single.php inside the WordPress loop.

<?php
		  setPostViews(get_the_ID());
?>

If you want to display post views, add this code within the loop.

<?php
		  echo getPostViews(get_the_ID());
?>