• How do we turn off the prettify setting and get the number with a comma?

    I have a sidebar with a list of popular posts here [ redundant link deleted ] but need to find a way to remove the prettify formatting through the shortcode. I also want the number to have commas. Can you give me some samples of shortcode that works please?

    [wpp post_type='post' limit=28 range='all' order_by='views' cat='71,-140' thumbnail_width='130' thumbnail_height='73' wpp_prettify_numbers="false"]

    [wpp post_type='post' limit=28 range='all' order_by='views' cat='71,-140' thumbnail_width=130 thumbnail_height=73 stats_views=1 include_views_text=1 stats_comments=0 number_format=1 include_views_text=0]

    I know I can get numbers with commas for a page like this

    [wpp_views_count number_format=1 include_views_text=0]

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @a4jpcom,

    The “prettify numbers” functionality can be only disabled via the wpp_prettify_numbers filter hook, it can’t be done via shortcode.

    Please add the following code snippet to your theme’s functions.php file to disable it:

    /**
    * Disables WP Popular Posts' "Pretty Numbers".
    *
    * @param bool $pretty_numbers
    * @return bool
    */
    add_filter('wpp_prettify_numbers', '__return_false');
    Thread Starter a4jp

    (@a4jpcom)

    Can you add the shortcode option to the next update please? Sometimes I need prettified number on some pages but not on others? I also need numbers with and without commas depending on designs.

    Thread Starter a4jp

    (@a4jpcom)

    Also how do I change the “view/views” to “View/Views” or “回” per sidebar instance or remove the word form some pages. I have both English and Japanese versions in different sidebars.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Can you add the shortcode option to the next update please? Sometimes I need prettified number on some pages but not on others? I also need numbers with and without commas depending on designs.

    Thanks for the suggestion, I’ll keep that in mind. No promises though.

    Also how do I change the “view/views” to “View/Views” or “回” per sidebar instance or remove the word form some pages.

    Please read this, same principle applies here: https://wordpress.org/support/topic/remove-posted-on-6/

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.