How to Enable Threaded Comments in WordPress

Home/Wordpress tricks/How to Enable Threaded Comments in WordPress

How to Enable Threaded Comments in WordPress

You can enable threaded comments for posts using a simple trick. WordPress does not enable threaded comments by default, but you can do it using this code in functions.php


function ax_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', 'ax_threaded_comments');

Thanks to wpshout for this trick.

Yumna Tatheer

Yamna Tatheer is a WordPress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

More Posts

Follow Me:
Facebook

About the Author:

Yamna Tatheer is a Wordpress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

Leave A Comment

WhatsApp chat