• Resolved BlackBoXz

    (@blackboxz)


    Hello,
    I found this below code to show view counts but I can’t get it to work in 1.5.2.

    Is this code still valid?

    Thank you for your response…

    Go to line no 39 of wp-trending-post-slider-and-widget/templates/slider/design-1.php and put this code
    
    <?php 
    $views = get_post_meta( $post->ID, WTPSW_META_PREFIX.'views', true );
    $views = !empty($views)?$views:0;
    $wtpsw_post_stats[] = "<span class='wtpsw-post-comment'># of Views: ".get_post_meta( $post->ID, WTPSW_META_PREFIX.'views', true )."</span>";
    ?>	
    
    Note:- Your modified code will lose when the plugin will update.
    if you face error then write manually do not copy and paste may be causing quote (”) issue.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show posts view count’ is closed to new replies.