Change Comment to Post Views

  • Posted in : Empathy
  • Anonymous
    Inactive

    How can i Change the “0 Comments” on single post article to Post Views? Like “356 Views”

    I found the code but i dont know what i should replace with.

    <span class=”comment-link”>
    <?php comments_popup_link( __( ‘0 Comment’, ‘read’ ), __( ‘1 Comment’, ‘read’ ), __( ‘% Comments’, ‘read’ ), “”, __( ‘Comments Off’, ‘read’ ) );?>
    </span>

    serkan
    Moderator

    Hi GaroPpo,
    You can use this custom css code for hiding the comments span. Then I would recommend you to search a plugin for view feature.

    .blog-single .entry-meta .comment-link { display: none; }

    Example ; https://wordpress.org/plugins/wp-postviews/
    Thanks

    Anonymous
    Inactive

    I’ve got it without plugin..
    Use this method: http://wpsnipp.com/index.php/functions-php/track-post-views-without-a-plugin-using-post-meta/

    anyway, where i can find the file to edit blog page template?

    Mehmet S.
    Keymaster

    Hi, it is index.php file.

    Thanks

    Anonymous
    Inactive

    Thank you!

    Mehmet S.
    Keymaster

    You are welcome.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register