WordPress.org

Ready to get started?Download WordPress

Forums

WP SlimStat
[resolved] Total Pageviews (12 posts)

  1. Zeb
    Member
    Posted 1 year ago #

    Hi Camu,

    How can I display the total Page views on my site?
    I use WP SlimStat Shortcodes but I can't get the total number of visits on the homepage.

    Please see my thread here.

    http://wordpress.org/extend/plugins/wp-slimstat/

  2. camu
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there,

    I've been a little incognito on the Shortcodes plugin, I assume something needs to be updated. I don't have a timeline, but I'm hoping to be able to do that soon :)

    Cheers,
    Camu

  3. Zeb
    Member
    Posted 1 year ago #

    Thanks camu,

    I appreciate your efforts and good job!

    It seems that the problem starts with version 2.8.4. If 2.8.3 is installed then the counter shows all hits as intended. Read more...

    I also would like to suggest if there is any possibility for the plugin to be able to display the total pageviews ever available, even if the database cache has limited information for the passed 180 days.

    Cheers,
    Zeb

  4. oshingler
    Member
    Posted 1 year ago #

    Just to note that this doesn't just affect Shortcodes - I'm not actually using shortcodes. I use the following PHP to display the total visitors, and it's now only displaying the total visitors since 1st Jan 2013 instead of all time:

    require_once(WP_PLUGIN_DIR.'/wp-slimstat/admin/view/wp-slimstat-db.php');

    // Initialize the API. You can pass a filter in the options, i.e. show only hits by people who where using Firefox, any version
    wp_slimstat_db::init();

    // Use the appropriate method to display your stats
    $old_bbclone_visitors = 0;
    $totalvisits = wp_slimstat_db::count_records('1=1', '*', false) + $old_bbclone_visitors;
    echo $totalvisits;

  5. James
    Member
    Posted 1 year ago #

    hi! could you, guys, please tell me if WP SlimStat (with Shortcodes plugin or without) would allow me to display page views of a single page (in front end - single custom post)? What about chart view?

    thanks!

  6. oshingler
    Member
    Posted 1 year ago #

    v2.9 hasn't resolved my issue - it still only shows total pageviews since 1st Jan. I'll have to roll back to 2.8.3 I think.

  7. camu
    Member
    Plugin Author

    Posted 1 year ago #

    Oshingler, your code needs to be changed to

    $totalvisits = wp_slimstat_db::count_records('1=1', '*', false, '', false) + $old_bbclone_visitors;

    Check it out!

    PS: a vote for my plugin would be a nice way to say thank you.

  8. oshingler
    Member
    Posted 1 year ago #

    That's perfect Camu, thank you - it all works great now.

    And you already have a 5-star review!

  9. camu
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you so much!

  10. Zeb
    Member
    Posted 1 year ago #

    @camu,
    Thank you for your efforts.

    Would you please describe your suggestion how we could implement it in our theme(s).

    Can we use it in a sidebar? or any updates to come in regard to your short code plugin?
    BR

  11. camu
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Zeb,

    the FAQs should provide enough information about how to use the shortcodes. If you want to use them in your TEXT widgets, you will have to add the following code to your functions.php

    add_filter( 'widget_text', 'do_shortcode' );

    I removed that from the plugin's code because it was way too onerous for most users, slowing down the entire site, as described here

    http://wordpress.org/extend/ideas/topic/add_shortcode-support-in-widgets

    Thanks,
    Camu

  12. Zeb
    Member
    Posted 1 year ago #

    Hi camu,

    I appreciate your reply but I believe there were a misunderstanding.

    What I refered to was using your above suggested code to get the Total Page View in the front end (or widgets) using:

    Oshingler, your code needs to be changed to

    $totalvisits = wp_slimstat_db::count_records('1=1', '*', false, '', false) + $old_bbclone_visitors;

    Check it out!

    PS: a vote for my plugin would be a nice way to say thank you.

    I appreciate your reconsidration.
    Kind regards,
    Z

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic