Wordpress:如何使用Ajax加载更多评论?

时间:2018-08-17 21:25:37

标签: php jquery ajax wordpress

这是我的comment.php文件:

<?php  

    if ( comments_open() ) { // Check If Comments Are Enabled!
        echo '<span class="comments-number">'; 
            comments_number( 'No Comments', '1 Comment', '% Comments' );
        echo '</span>';
        echo '<ul class="list-unstyled comments-list">';
        $comments_args = array(
            'max_depth'          => 3,
            'type'               => 'comment',
            'avatar_size'        => 48,
            'reverse_top_level'  => true,

        );
        wp_list_comments( $comments_args );
        echo '</ul>';
    } else {
        echo "Sorry, Comments Are Disabled By Admin!";
    }


?>

我需要一些帮助来加载更多评论而不重新加载页面!

0 个答案:

没有答案