• Resolved ovidiuav

    (@ovidiuav)


    Hi there!

    On a comment with two likes, for example, the counter shows “2+” and I don’t get what’s with that plus sign, so I’d like to remove it. Can I get a little help? Where do I have to stick my nose to get rid of it?

    Thanks!

    https://www.ads-software.com/plugins/wp-ulike/

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

    (@alimir)

    Hi @ovidiuav
    You can add this filter by copy & paste the following code in your theme’s function.php file: ??

    <?php
    add_filter('wp_ulike_format_number','wp_ulike_new_format_number',10,3);
    function wp_ulike_new_format_number($value, $num, $plus){
        if ($num >= 1000 && get_option('wp_ulike_format_number') == '1'):
        $value = round($num/1000, 2) . 'K';
        else:
        $value = $num;
        endif;
        return $value;
    }
    ?>

    Thread Starter ovidiuav

    (@ovidiuav)

    thanks for answering!
    unfortunately, I use DMS which is different from regular themes and adding that to functions.php just breaks my blog.

    here’s what’s in my functions.php:

    <?php
    /**
     * FUNCTIONS / THEME INITIALIZATION
     *
     * This file loads the core framework which handles everything.
     *
     * @package     PageLines Framework
     * @since       1.0
     *
     * @link        https://www.pagelines.com/
     * @link        https://www.pagelines.com/DMS
     *
     * @author      PageLines   https://www.pagelines.com/
     * @copyright   Copyright (c) 2008-2013, PageLines  [email protected]
     *
     * @internal    last revised January 20, 2012
     * @version     ...
     *
     * @todo Define version
     */
    require_once( get_template_directory() . '/includes/init.php' );

    @ovidiu Avr?mu? you can still add the code. You probably copied it too literally.

    <?php
    /**
     * FUNCTIONS / THEME INITIALIZATION
     *
     * This file loads the core framework which handles everything.
     *
     * @package     PageLines Framework
     * @since       1.0
     *
     * @link        https://www.pagelines.com/
     * @link        https://www.pagelines.com/DMS
     *
     * @author      PageLines   https://www.pagelines.com/
     * @copyright   Copyright (c) 2008-2013, PageLines  [email protected]
     *
     * @internal    last revised January 20, 2012
     * @version     ...
     *
     * @todo Define version
     */
    require_once( get_template_directory() . '/includes/init.php' );
    add_filter('wp_ulike_format_number','wp_ulike_new_format_number',10,3);
    function wp_ulike_new_format_number($value, $num, $plus){
        if ($num >= 1000 && get_option('wp_ulike_format_number') == '1'):
        $value = round($num/1000, 2) . 'K';
        else:
        $value = $num;
        endif;
        return $value;
    }

    Thread Starter ovidiuav

    (@ovidiuav)

    Thanks Simon, it seems I hadn’t added it right. Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove " " sign in counter’ is closed to new replies.