• Resolved think2wice

    (@think2wice)


    First off, let me thank you for creating this plugin. I had to get rid of another one I was using because whenever we experienced massive traffic spikes, our server would slow down. This works great and doesn’t hog our server resources.

    Anyhow, is it possible for me to change something in the plugin file (or maybe in the php output of the shortcode) to display large numbers with commas?

    For instance, 100 thousand views currently shows up as “100000”

    How do I make it so that the number shows up as “100,000” ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thanks a lot for the kind words, and for the feedback! That’s indeed on my list of future improvements. Until the next release, you can follow my progress on this here:
    https://github.com/jeherve/jp-post-views/issues/1

    Thread Starter think2wice

    (@think2wice)

    No problem! I see that you have plans to implement the “K” and “M” letters for the bigger numbers (thousands and millions) so I assume the comma thing won’t even be necessary, unless you plan on giving users the option of which version to use in the settings.

    Anyhow, for now, I was able to come up with a quick workaround that appears to work fine (so far so good).

    See below:

    <?php echo '&nbsp;' . number_format( do_shortcode( '[jp_post_view]' ) ); ?>

    • This reply was modified 8 years, 2 months ago by think2wice.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to insert commas between large numbers’ is closed to new replies.