WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostViews
How to make it show on index.php? (Mainpage) (4 posts)

  1. phattrance
    Member
    Posted 3 years ago #

    Does anyone know how i can make this plugin to work on the posts thats being shown on index.php (first page on the blog.)?

    to make this plugin to start counting, the visitor needs to visit the single.php (post). most of my visitors dont do that, so i wonder if its possible somehow to add this counter to also the index.php file (main page)

  2. Lester Chan
    Member
    Plugin Author

    Posted 3 years ago #

    Nope it does not work on the front page because there is no way of knowing what post is viewed and what is not. Updating all the post views for the post loaded on the front page is too heavy.

  3. phattrance
    Member
    Posted 3 years ago #

    but what if having 1 post on the front page? like this page: http://funny-pictures-blog.com/

    that would be as the same as having it as a "post"

  4. ryan4021
    Member
    Posted 2 years ago #

    Hello Lester,

    First off, thanks for the great assortment of plugins not just this one that you've contributed to the WordPress community, I use a number of them and they work like a charm.

    I have one question sort of extending off the OP, which I think would be a solution for him/her as well... Would it be doable to include this within a WP_Query instance and have it pull the post view count this way?

    My goal here is I've created a 'popularity by view count' topics section at the top of my index page. I have this running through a WP_Query loop to pull 3 posts max and the other arguments are defaulted. So essentially, it's pulling the latest posts updated and displaying them as of right now.

    Would I be able to include the view count logic within this to show the view count and prioritize posts here BASED on that count.

    Example Format:

    Highest View Count Post - Second Highest View Count Post - Third Highest View Count Post

    That way it's showing posts based on popularity of view count instead of comment count.

    Thanks Lester

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic