• Resolved djus1

    (@djus1)


    I want to add 0 to my likes. I’m a noob, please explain how can I apply this filter and where should I enter it? ‘cld_dislike_count’.

    I’ve already spent 3 hours solving this problem and ..

    /mod note: please calm down and get some sleep or something tasty to eat, this helps/

    • This topic was modified 4 years, 3 months ago by Yui.
    • This topic was modified 4 years, 3 months ago by Yui.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Happy Coders

    (@happy-coders)

    Hello there,

    Thank you for writing to us.

    Please add below code inside your active theme’s functions.php file.

    
    add_filter( 'cld_like_count', 'show_zero_cld', 10, 2 );
    add_filter( 'cld_dislike_count', 'show_zero_cld', 10, 2 );
    
    function show_zero_cld( $like_dislike_count, $comment_id ) {
        if ( empty( $like_dislike_count ) ) {
            return '0';
        } else {
            return $like_dislike_count;
        }
    }
    

    Regards,
    WPHC

    Thread Starter djus1

    (@djus1)

    thank you very much!!!

    Plugin Author Happy Coders

    (@happy-coders)

    Hello djus1,

    We are glad that we could help you. If you are really happy with our plugin and support then please support us by giving us a review.

    Regards,
    WP Happy Coders

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WHAT DO I NEED TO DO TO APPLY FILTER ‘cld_dislike_count’’ is closed to new replies.