WordPress.org

Forums

WordPress Stats View Counter
[resolved] Parameters for shortcode "all time views" (4 posts)

  1. Mr-B
    Member
    Posted 2 years ago #

    Struggling to find documentation.
    How do I give the shortcode to show "all-time views" instead of default, which seems to be "today views"?
    Thanks

    http://wordpress.org/plugins/wp-stats-view-counter/

  2. Adam Capriola
    Member
    Plugin Author

    Posted 2 years ago #

    Please read the FAQ: http://wordpress.org/plugins/wp-stats-view-counter/faq/

    It does show all time views for each post (not single day views).

  3. Mr-B
    Member
    Posted 2 years ago #

    I can confirm that Jetpack -> Site Stats report:
    Today
    5 views
    Best ever
    93 views
    All time
    1,138 views

    However when I put in a shortcode of
    [view-count before="Site views: "]

    The page displays:
    Site views: 5

    If I have misunderstood the functionality and this is a counter for a single-page or post only, it's not what I am looking for as I want the all time views for the whole site. It's appreciated that you have made the effort to produce a plugin, thanks anyway but it's no good for me.

  4. Adam Capriola
    Member
    Plugin Author

    Posted 2 years ago #

    It is for single posts and page view counts, not for your entire site. Sorry. You might be able to get some estimation of total views using get_posts or WP_Query. I say estimation because this plugin doesn't keep track of views on archive pages. You would basically need to loop through all posts and keep a running total using something like $total .= get_post_meta( $post->ID, 'views', true );.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Stats View Counter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.