If you need to show the number of posts or pages on your WordPress site without using a plugin, you can write a simple function and add it to the functions.php
Now, in order to display the number of views, add this code to the single.php or page.php
<?php simple_post_views( get_the_ID() ); ?>


If you also want to show the number of views in the WordPress admin dashboard, use this code:
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn