There was a problem loading the comments.

Enabling Comments on WordPress Blogs

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
To enable commenting, follow these steps:

1. Create a file called post-comment.php (randomise that name to avoid footprints and comment spam) in your site's public_html folder with the following content:
<?php
include("wp-comments-post.php");
?>

2. Add the following lines to your theme's functions.php file, noting to swap post-comment.php for the name of your new comments file:
add_filter( 'comment_form_defaults', 'enablecomments_comment_form_defaults' );
function enablecomments_comment_form_defaults( $defaults ) {
  $defaults[ 'action' ] = site_url( '/post-comment.php' );
  return $defaults;
}

3. Add a CAPTCHA plugin to prevent comment spam, such as hCaptcha - details can be found here.

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

© LaunchCDN