Why are my threaded comments not quite working?

admin2025-06-04  3

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 6 years ago.

Improve this question

I had to switch from DISQUS as it got blocked in China and thus doesn't work and slows page loading down. I had hundreds of comments some were threaded, I got them to display correctly, but if I add a new comment replying to an old comment it doesn't thread.

This is my functions.php code which is from somewhere:

/* Add Theme Support for Threaded Comments */
add_action('get_header', 'enable_threaded_comments');
function enable_threaded_comments() {
    if ( ! is_admin()) {
        if (is_singular() && comments_open() && (get_option('thread_comments') == 1))
            wp_enqueue_script('comment-reply');
    }
}

This is my comments.php code again straight from somewhere else:

    wp_list_comments( array(
        'short_ping'  => true,
        'avatar_size' => 50,
    ) );

I did some styling and I used this old post which some guy left a rather disturbing comment on recently to test and replying to my reply from back when I still had DISQUS does not create a third level. Thanks for any ideas in the console it says something is missing but when I try to debug it, the behaviour doesn't always occur, hence asking here. Thanks in advance.

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 6 years ago.

Improve this question

I had to switch from DISQUS as it got blocked in China and thus doesn't work and slows page loading down. I had hundreds of comments some were threaded, I got them to display correctly, but if I add a new comment replying to an old comment it doesn't thread.

This is my functions.php code which is from somewhere:

/* Add Theme Support for Threaded Comments */
add_action('get_header', 'enable_threaded_comments');
function enable_threaded_comments() {
    if ( ! is_admin()) {
        if (is_singular() && comments_open() && (get_option('thread_comments') == 1))
            wp_enqueue_script('comment-reply');
    }
}

This is my comments.php code again straight from somewhere else:

    wp_list_comments( array(
        'short_ping'  => true,
        'avatar_size' => 50,
    ) );

I did some styling and I used this old post which some guy left a rather disturbing comment on recently to test and replying to my reply from back when I still had DISQUS does not create a third level. Thanks for any ideas in the console it says something is missing but when I try to debug it, the behaviour doesn't always occur, hence asking here. Thanks in advance.

Share Improve this question edited Jan 9, 2019 at 14:57 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Jan 9, 2019 at 11:59 MuskieMuskie 1151 silver badge8 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

I have fixed this, though I must "style" things better with CSS. In short my theme was not completely updated to WordPress 2.7. I needed one line of code in header.php and a few changes to comments.php it is all detailed on Ottodestruct.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749010838a315592.html

最新回复(0)