Okay
  Public Ticket #155059
How do you turn off the comments?
Closed

Comments

  • C started the conversation
    Hello, how do you turn off the comments? Thank you for your help.
  •  93
    djwd replied

    Hi there,

    to globally disable comments and not set them post by post, you should remove the comment block from the template files. A simpler solution could be by using this small plugin

    Regards
    djwd

    Regards
    djwd

  • C replied

    Hello, thank you for your quick reply! Can you please point me to where I can remove the comment block from the template files?

    Thank you.

  •  93
    djwd replied

    I suggest to go with the plugin solution not to lose your changes in case of theme update.

    Btw you should open single.php and comment out/remove this part (lines 24-44)

    <?php // Load Facebook or WP Comments
    			$pm_comment_type = get_post_meta(get_the_ID(), 'pm_comment_type', true);
    			
    			$url = (!empty($_SERVER['HTTPS'])) ? "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    			?>
    			
    			<?php if ($pm_comment_type == 'fb') { ?>
    					
    				<div class="fb-comments" data-href="<?php echo $url; ?>" data-num-posts="4"></div>
    				
    			<?php } elseif ($pm_comment_type == 'none') { 
    				
    						echo '';
    			
    				  } else {
    				
    					if ( comments_open() || '0' != get_comments_number() )
    					comments_template( '', true );
    				  }
    			?>
    
    

    Hope this helps

    djwd

    Regards
    djwd