TELL Communications Limited
asked 6 years ago

Good Day,
Please is there a way to show (on the home page, the category page and the article page), the number of reads for a specific article.
Regards
 
Lana

1 Answers
DominicStaff
answered 6 years ago

At the moment, DW Focus does not yet support to display the number of article reads on the homepage. However, you can display in single post & categories page. Please do as the following:
1. Please install the WP-PostViews plugin.
2. Open the content-single.php file in the folder path “wp-content\themes\dw-focus”. Find the line 12, add the following code under line 12:

  <?php _e(' - ','dw-focus'); ?>
 <?php if(function_exists('the_views')) { the_views(); } ?>

– To display in the Categories page, you can open the content-archive.php file. Find the line 94,add the following code under line 94:

  <?php _e(' - ','dw-focus'); ?>
 <?php if(function_exists('the_views')) { the_views(); } ?>

Hope this helps !

Nadya Jahan
replied 6 years ago

Hi Dominic, is it possible to do it for Dw Fixel too? I would like to show the info especially on the home page. Thanks!

Dominic Staff
replied 6 years ago

Please tell me detail about the info especially on the home page. However, if you want to display the number of article reads on the homepage. You can open the content.php file in the folder path “wp-content\themes\dw-fixel” Find the line 46, add the following code under line 46:
< ?php _e(' - ','dw-fixel'); ?>
< ?php if(function_exists('the_views')) { the_views(); } ?>

damilarelana
replied 6 years ago

Hi Dominic thanks for the reply … apologies for the late reply …
One problem encountered though is that there is no “line 94” in the “content-archive.php” …
Any ideas …

Dominic Staff
replied 6 years ago

you can send me username & password of your site (via private answer) for further checking.

Powered by DW Question & Answer Pro