• Hello. In case somebody wants it too, or if the plugin author wants to correct/include this feature, here is how I:

    – Added a title to the plugin
    – Control the number of 0s
    – Add a Shortcode

    Edit the file wp-content/plugins/wordpress-hit-counter/iamge.php

    To add the shortcode functionality (optional), follow the guides in this topic: https://wordpress.org/support/topic/short-code-8?replies=2

    To add a title before the counter, like “Visitors: “, just add:

    echo “Visits: “; //add this just before the counter digits

    Before the line:

    if (get_option(‘wphc_pad_zeros’) && strlen($hits) < 7) {:

    ** you have to do this 2 times in the file, 1 for the widget and 1 for the footer counter.

    – To control the number of 0s, you can change 7 to 6, or 5 in this lines (there are 2 places to change it)

    for ($i = 0; $i < (7 – strlen($hits)); $i++) {

    Thats all.

    The CSS style if you need it, is
    .wordpress-hit-counter {
    }

    https://wordpress.org/plugins/wordpress-hit-counter/

  • The topic ‘I found how to add title and edit number of 0s’ is closed to new replies.