Topic: Page Views Counter
Download and extract the plugin, put the pageview folder with its contents in plugins folder. Update your config.php file:
<?php return array( ... ... ... 'plugins' => array( 'markdown', 'sitemap', 'admin', // <= Recommended to be installed 'pageview' // <= Activation ), 'pageview_config' => array( // Change to `false` if you want to remove the leading zero in counter 'leading_zero' => '0000' ) );
Updating the Template File
In your blog_post.html template, add this code wherever you like. Do it once, or you will get double page views in one page:
<span class="page-views"> <strong class="page-views-label">Total Page Views:</strong> <span class="page-views-counter"> <?php Morfy::factory()->runAction('pageview'); ?> </span> </span>
Disabling the Page Views Counter for Admin
The admin plugin is not required. But if you already have it installed in your theme, then your page visits will not be included in the page views if you already logged in.