Hits com_content

 

For The Blog Layout :

Open components/com_content/views/category/tmpl/blog_item.php

<?php if ($this->params->get('show_hits')) : ?>
        Views :<?php echo $this->item->hits; ?>Times
<?php endif; ?>

 

For The Article to show hits :

Open components/com_content/views/article/tmpl/default.php

 

<?php if ($this->params->get('show_hits')) : ?>
    Views :<?php echo $this->article->hits; ?>Times
<?php endif; ?>

 

For The Front Page to show hits :

Open components/com_content/views/frontpage/tmpl/default_item.php

<?php if ($this->params->get('show_hits')) : ?>
   Views :<?php echo $this->item->hits; ?>Times
<?php endif; ?>

 

And to work in the front Page you need to add a 4 letters to the file :
Open components/com_content/models/frontpage.php
Search for :

CODE: SELECT ALL

$query = ' SELECT a.id, a.title, a.title_alias, a.introtext, a.fulltext


its a long line
Find

CODE: SELECT ALL

a.publish_down, a.images, a.attribs,


replace with :

CODE: SELECT ALL

a.publish_down, a.images, a.attribs, a.hits,