Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Claudio Sanches

    (@claudiosanches)

    Thread Starter fanbolero

    (@fanbolero)

    Thank you Claudio!
    What file (and line) on your plugin should I modify with the number_format function?

    Plugin Author Claudio Sanches

    (@claudiosanches)

    In case it is not to change the plugin.
    And yes, it is possible to make a widget in your theme and use it.

    For this you can use the following functions:

    Twitter: <?php echo get_scp_twitter(); ?>
    Facebook: <?php echo get_scp_facebook(); ?>
    Posts: <?php echo get_scp_posts(); ?>
    Comments: <?php echo get_scp_comments(); ?>
    Widget: <?php echo get_scp_widget(); ?>

    However, I will release a new version of it today, with filters to be able to change the number format.

    And commenting here again showing you how to do this.

    Thread Starter fanbolero

    (@fanbolero)

    Thanks!! I will wait for it.

    Plugin Author Claudio Sanches

    (@claudiosanches)

    Update the plugin to version 2.2 and and use this in your functions.php:

    https://gist.github.com/claudiosmweb/5424439

    Thread Starter fanbolero

    (@fanbolero)

    Thank you Claudio!!
    It works perfectly.

    A suggestion for a future release:
    I have a dark theme on my blog. I manually changed the color for the texts in your plugin on counter.css. It would be nice to have an option for selecting light/dark text color.

    Thanks again for the wonderful plugin.

    Plugin Author Claudio Sanches

    (@claudiosanches)

    Noted here, the next version will add something.

    Hello,

    does this functions.php code also work if I am just showing the numbers instead of the whole visual style? I am using the recent version of this great plugin and using this code in my functions.php – but there are still no comma or points. Still, for example, facebook shows 2687 followers instead 2.687 or similar. What am I doing wrong?

    PS: I found the problem. Your solution works with shortcodes but unfortunately NOT with PHP-code. So when I include social counts with for example <?php echo get_scp_facebook(); ?> the comma does not show up. But when I use [scp code=”facebook”] within a post – it works.

    But I would need it for PHP. Will there be a fix?

    Plugin Author Claudio Sanches

    (@claudiosanches)

    I do not know if you know, but you can use PHP one time or another in their life.
    For example:

    <?php echo number_format( get_scp_facebook(), 0, '', ',' ); ?>
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Ad a comma to numbers’ is closed to new replies.