Title: adding views counter
Last modified: October 6, 2019

---

# adding views counter

 *  [lonestaritaly](https://wordpress.org/support/users/lonestaritaly/)
 * (@lonestaritaly)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-views-counter/)
 * Hello,
    what would be the best way to integrate views counter meta, such as the
   the_views() one offered by WP-PostViews plugin, in Customify?
 * On simpler themes one would manually edit single.php or index.php but in this
   case it’s not quite easy.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [longnguyen](https://wordpress.org/support/users/longnguyen/)
 * (@longnguyen)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-views-counter/#post-12026020)
 * Hi there,
 * The theme uses another way to customize and show up the single post. You can 
   use this code in the file functions.php
 *     ```
       add_action( 'customify/single/field_title/before', function( $post, $fields, $args, $class_post_entry ) {
       	echo "action before title of the single post";
       	the_views();
       }, 10, 4 );
       ```
   
 * to show the sample text and the views before the post title.
    [https://cl.ly/5f3a4b297c4d](https://cl.ly/5f3a4b297c4d)
 * For more information about the hook, please follow
    [https://github.com/PressMaximum/customify/blob/master/inc/blog/class-post-entry.php#L714-L723](https://github.com/PressMaximum/customify/blob/master/inc/blog/class-post-entry.php#L714-L723)
 * Regards.
 *  Thread Starter [lonestaritaly](https://wordpress.org/support/users/lonestaritaly/)
 * (@lonestaritaly)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/adding-views-counter/#post-12043103)
 * Hi,
 * thanks for the details! Very interesting
 * I suppose that only works with Pro theme, related to Content Hooks module.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘adding views counter’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customify/0.4.20/screenshot.png)
 * Customify
 * [Support Threads](https://wordpress.org/support/theme/customify/)
 * [Active Topics](https://wordpress.org/support/theme/customify/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customify/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customify/reviews/)

## Tags

 * [customization](https://wordpress.org/support/topic-tag/customization/)

 * 2 replies
 * 2 participants
 * Last reply from: [lonestaritaly](https://wordpress.org/support/users/lonestaritaly/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/adding-views-counter/#post-12043103)
 * Status: not resolved