我有所有的设置设置,以允许评论我的博客帖子。但是,当您单击该链接发布评论时,不会发生任何情况。附件是我的comments.php文件,网站也是www.djjigs.com,谢谢!
<?php if ( have_comments() ) : ?>
<h2 id="comments-title">
<?php comments_number(__('No Comments', 'stylico'), __('1 Comment', 'stylico'), __('% Comments', 'stylico')); ?>
</h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-above">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'stylico' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'stylico') ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'stylico') ); ?></div>
</nav>
<?php endif; ?>
<ol class="commentlist">
<?php wp_list_comments( 'callback=stylico_comment' ); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'stylico'); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'stylico') ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'stylico') ); ?></div>
</nav>
<?php endif; ?>
<?php
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'stylico'); ?></p>
<?php endif; ?>
<?php comment_form( array( 'comment_notes_after' => '', 'label_submit' => __('Send Comment', 'stylico') ) ); ?>发布于 2012-09-20 18:35:55
我不确定,你是在谈论评论回复还是普通的(非回复)评论。
无论如何,下面是如何从您的functions.php文件注册评论回复脚本:
function wpse60406_scripts()
{
# Comment reply script
if (
is_singular() // Use is_single() if this shouldn't work for pages
AND get_option( 'thread_comments' )
)
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'wpse60406_scripts' );https://wordpress.stackexchange.com/questions/60406
复制相似问题