WordPress.org

Ready to get started?Download WordPress

Forums

WP-Piwik
Could we add a Visitor Counter in the next upgrade? (4 posts)

  1. andrewtansw
    Member
    Posted 1 year ago #

    It would be great if we could have a visitor counter widget that we can show in the sidebar or footer of WordPress.

    Many webmasters with busy sites may want to show how many people visit their website each day and on a cumulative basis.

    For your consideration

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

  2. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    Since 0.9.7 WP-Piwik supports shortcodes. E.g. you can use

    [wp-piwik module="overview" title="" period="day" date="yesterday"]

    to show the overview data. You should also be able to call WP-Piwik's function shortcode($aryAttributes) to show the overview in your footer or sidebar.

    Example (I didn't try yet):
    $GLOBALS['wp_piwik']->shortcode(array('module'=>'overview'));

    More shortcodes (if applicable also widgets) will follow by and by.

  3. andrewtansw
    Member
    Posted 1 year ago #

    I've not been successful in using the [wp-piwik module="overview" title="" period="day" date="yesterday"] shortcode.

    I inserted the above shortcode into a text box and put it in one of the footer widget. It displayed the shortcode as a text in the footer when I view it from the Home page.

    Maybe I'm doing something wrong?

    Andrew

  4. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    The shortcode itself works on pages and sites only. (And WP-Piwik shortcodes have to be activated.)

    To add contents to your sitebar or your footer, you can try to call the PHP function within the related files.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic