Icons not showing up on non singular pages
-
Just installed the plugin for the first time today. I had to modify the source to get the icons to show up next to the count on any pages with the_excerpt. When I checked the plugins source it seemed to be commented out in front_end.php line 53. I fixed it by uncommenting line 54 and wrapping them in an if statement.
replaced:
add_filter( ‘the_content’, array( $this, ‘add_post_views_count’ ) );
//add_filter( ‘the_excerpt’, array( $this, ‘add_post_views_count’ ) );with:
if ( is_singular() ) {
add_filter( ‘the_content’, array( $this, ‘add_post_views_count’ ) );
} else {
add_filter( ‘the_excerpt’, array( $this, ‘add_post_views_count’ ) );
}Seems to be working for me now, figured I would post this in case it comes up for anyone else or if there is a setting somewhere else I am unaware of. If there is a setting I am missing please let me know, I would prefer to keep the source files untouched if possible.
- The topic ‘Icons not showing up on non singular pages’ is closed to new replies.