Enable threaded comments

Add the following code to the functions.php file to enable threaded comments. Simple, easy but a great feature to add to your site.

function wpsnipp_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', 'wpsnipp_enable_threaded_comments');

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.