Enable Threaded Comments in WordPress

in Customise Comments

Threaded comments is a nice feature to highlight to your visitors the admin comments or reply comments this enables better readability of the comments section of your blog posts.

There are plugins which allow you to enable threaded comments but this can easily be done by using a wordpress hook.

Just add the below snippet into your functions.php.

// enable threaded comments
function enable_threaded_comments(){
if (!is_admin()) {
     if (is_singular() AND comments_open() AND (get_option('thread_comments') == 1))
          wp_enqueue_script('comment-reply');
     }
}

add_action('get_header', 'enable_threaded_comments');

Subscribe To Newsletter

Get weekly updates to your email