나는 많은 것들을 시도한 것처럼 느껴진다. 그래서 나는 도움을 청하기 위해 여기에있다. 다른 사람들을 위해 일한 것은 나를 위해 일하지 않았습니다. 중첩 된 주석을 넣으려고 노력하고 있지만 작동시키지 못합니다. 답장을 보내려는 댓글 아래에 답장 형식이 표시되기 때문에 상황이 이상합니다. 그러나 게시물을 치면 작동하지 않습니다. 또한 URL을 보면 # comment- (일부 값)에서 # respond- (일부 값)로 변경되지 않습니다. 내 Chrome Inspector 탭에 js가 제대로로드되고 있음을 알 수 있습니다. 나는 코멘트 답장을 적절하게 큐잉하고있다.Wordpress 답글 덧글 Link
스크립트를 다른 방식으로 대기열에 추가하고 permalinks를 기본값으로 재설정하고 수많은 코드를 변경했지만 아무 것도 작동하지 않는 것 같습니다. 어떤 도움이라도 대단히 감사하겠습니다. 나는 주위를 검색해 보았지만 비슷한 문제가있는 해결책이나 사람을 찾을 수 없었습니다.
[수정] : 내 inspector 탭에 comment-reply.js가 제대로로드 된 것을 볼 수 없습니다. 나는 그것을 내 header.php에서 wp_head 위에 blahblahblah를 놓아서로드하려고 시도했지만,로드했지만 아무런 효과가 없었다.
Single.php :
<?php
if(comments_open()) {
comments_template();
}
?>
<?php endwhile;
endif;
?>
Comments.php :
<?php if(have_comments()): ?>
<h4 id="comments"><?php comments_number('No Comments', 'One Comment', '% Comments'); ?></h4>
<ol class="commentlist">
<?php wp_list_comments(array(
'callback' => 'ericshio_custom_comments',
'max-depth' => 'x',
)); ?>
</ol>
<?php else : ?>
<p class="no-comments">No comments yet</p>
<?php endif; ?>
<?php
$comments_args = array(
// Change the title of send button
'label_submit' => __('Post', 'ericshio'),
// Change the title of the reply section
'title_reply' => __('Write a Reply or Comment', 'ericshio'),
);
?>
<?php comment_form($comments_args); ?>
Functions.php :
여기 내가 사용하고있는 코드와 그 안에있는 파일입니다/* Custom Comments */
function ericshio_enqueue_comments_reply() {
if(get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
}
add_action('comment_form_before', 'ericshio_enqueue_comments_reply');
function ericshio_custom_comments($comment, $args, $depth) {
$GLOBALS[' comment '] = $comment; ?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-author vcard">
<?php echo get_avatar($comment, $size='48', $default='<path_to_url>'); ?>
<?php printf (__('<cite class="fn">%s</cite> <span class="says"> says:</span>'), get_comment_author_link()) ?>
</div>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('Your Comment is Awaiting Moderation.') ?> </em>
<br />
<?php endif ; ?>
<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?> </a> <?php edit_comment_link(__(' (Edit) '), ' ', ' ') ?> </div>
<div class="comment-wrapper">
<?php comment_text() ?>
<div class="reply">
<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
</div>
</div>
</div>
<?php
}
내가 – Isaac
하하하 당신은 무엇을 사용합니까 워드 프레스에 접촉하지 않는 이유는?: P – ERIC
wordpress 코멘트 시스템은 어리석게도 이상하고 복잡합니다. 특히 나는이 모든 것을 매우 초보자로하고 있습니다. 또한 코덱스는이 주제에 대한 많은 정보를 제공하지 않습니다. 특히 다른 참조 자료와 비교할 때 특히 그렇습니다. – ERIC