Support » Plugin: Comments Like Dislike » Enable plugin for only 1 post?

  • jaylacroix


    I would like to know if the like button could be enable only on a specific post or pages with comments. I saw you provide general settings, but I don’t see one for filtering the display like I need.

    Could this be acheived with the advanced filters or actions? I’m not familiar with those, but with a hint or two, maybe I could do it.


Viewing 1 replies (of 1 total)
  • Plugin Author Happy Coders


    Hi there,

    We are exactly not sure regarding your requirements because our comments’s like dislike button will only show on the comments and shouldn’t show on the pages or posts where there aren’t any comments.

    But still, we can suggest you some code to display the comments like dislike in specific post.

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

    add_filter( 'cld_like_dislike_html', 'customize_cld' );
    function customize_cld( $like_dislike_html ) {
    	if ( is_single( 223 ) ) {
    	} else {
    		$like_dislike_html = '';
    	return $like_dislike_html;

    Please replace 223 with any post id in which you want to display our plugin’s comments like dislike button.

    If you want to display in the specific page then please use is_page instead of is_single in the above code and replace 223 with the page id of the page in which you want to display the like dislike button.


Viewing 1 replies (of 1 total)
  • The topic ‘Enable plugin for only 1 post?’ is closed to new replies.