رفتن به مطلب

بسته شدن کامنت برای یک مطلب و مشکل پاسخ ها


پست های پیشنهاد شده

سلام

تا الان فقط یک مطلب رو در مطالبم دیدم که اینطوری بشه، این وضعیت بعد از تغییر قالب پیش اومده، امکان ارسال نظر برای این مطلب بسته شده!

نمایش مطلب

دلیلش چیه؟

مورد دیگه دربخش پاسخ های تودرتو هست،وقتی یک کامنت ارسال میشه ، امکان پاسخ به اون محدودیت نداره، اما پاسخی که به اون کامنت داده شده امکان پاسخ دادن براش فراهم نیست، یعنی فرض بگیرید که یک کاربر نظر داده، این نظر میشه در تعداد بالا پاسخ داد، اماوقتی من یا هر کاربر دیگه ای بهش پاسخ میدم، دیگه نمی تونه به نظری برای پاسخ من ارسال کنه

مثلا" این مطلب رو مشاهده کنید. لینک

این کدهای فایل کامنت هست


<div id="comments">
<?php if ( have_comments() ) :
echo '<div class="comment-text"><ol class="commentlist">';
wp_list_comments( array( 'callback' => 'elm_comment_loop' ) );
echo '</ol></div>';
?>
<?php
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="nocomments">مجوز ارسال دیدگاه داده نشده است!</p>
<?php
endif; ?>
<?php elm_comment_form(); ?>
</div>

این کدها رو هم اگر درست اینجا گذاشته باشم در فایل functions.php هست


function remove_comment_classes( $classes ) {
// Classes is an array of class names, so for each item - $array_key => $class_name
foreach( $classes as $key => $class ) {
// Check the class name
switch( $class ) {
// If the the class name is comment, move along
case 'comment':
unset( $classes[$key] );
break;
// If it's anything else, unset the item from the array (remove)
default:
continue;
break;
}
}
// Clean out the variables no longer needed
unset($key,$class);
$classes[] = 'text';
// Return the result
return $classes;
}

function elm_comment_loop( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p>بازتاب: <?php comment_author_link(); ?><?php edit_comment_link('ویرایش', '<span class="edit-link">', '</span>'); ?></p>
<?php
break;
default :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$avatar_size = 45;
if ('0' != $comment -> comment_parent)
$avatar_size = 39;
echo get_avatar($comment, $avatar_size);
/* translators: 1: comment author, 2: date and time */
printf('%1$s در %2$s ', sprintf('<span class="fn">%s</span>', get_comment_author_link()), sprintf('<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', esc_url(get_comment_link($comment -> comment_ID)), get_comment_time('c'),
/* translators: 1: date, 2: time */
sprintf('%1$s ، %2$s', get_comment_date("d M Y"), get_comment_time())));
?>
<?php edit_comment_link('(ویرایش)', '<span class="edit-link">', '</span>'); ?>
</div><!-- .comment-author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation">نظر شما بعد از تایید نمایش داده می شود.</em>
<br />
<?php endif; ?>
</footer>
<div class="comment-content"><?php comment_text(); ?></div>
<?php if ('0' == $comment -> comment_parent): ?>
<div class="reply">
<?php comment_reply_link(array_merge($args, array('reply_text' => 'پاسخ <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
</div><!-- .reply -->
<?php endif ?>
</article><!-- #comment-## -->
<div class="clear"></div>
<?php
break;
endswitch;
}
function elm_comment_form( $args = array(), $post_id = null ) {
global $id;
if ( null === $post_id )
$post_id = $id;
else
$id = $post_id;
$commenter = wp_get_current_commenter();
$user = wp_get_current_user();
$user_identity = ! empty( $user->ID ) ? $user->display_name : '';
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array(
'author' => '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" placeholder="نام و نام خانوادگی" size="30"' . $aria_req . ' />',

'comment' => '<textarea id="comment" name="comment" cols="45" rows="8" placeholder="توضیحات" aria-required="true"></textarea>' ,

'email' => '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" placeholder="آدرس ایمیل" size="30"' . $aria_req . ' />',

'url' => '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" placeholder="آدرس وب سایت" size="30" />',
);
$required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' );
$defaults = array(
'fields' => apply_filters( 'comment_form_default_fields', $fields ),
'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="8" placeholder="توضیحات" aria-required="true"></textarea>' ,
'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
'comment_notes_before' => '',
'comment_notes_after' => '',
'id_form' => 'commentform',
'id_submit' => '',
'title_reply' => 'ارسال نظر <br><small class="small_desc">لطفا نظر را در ارتباط با اين مطلب ارسال نماييد.سوالات خود را در <a href="http://www.elmevarzesh.com/forum" target=_blank> انجمن مشاوره سايت</a> مطرح کنيد</small>',
'title_reply_to' => __( 'Leave a Reply to %s' ),
'cancel_reply_link' => __( 'Cancel reply' ),
'label_submit' => ' ',
);
//'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
?>
<?php if ( comments_open() ) : ?>
<?php do_action('comment_form_before'); ?>
<div id="respond" class="idea">
<span id="reply-title" class="font-face"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?></small></span>
<?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
<?php echo $args['must_log_in']; ?>
<?php do_action('comment_form_must_log_in_after'); ?>
<?php else : ?>
<form action="<?php echo site_url('/wp-comments-post.php'); ?>" method="post" id="<?php echo esc_attr($args['id_form']); ?>">
<?php do_action('comment_form_top'); ?>
<?php if ( is_user_logged_in() ) : ?>
<?php echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?>
<?php do_action('comment_form_logged_in_after', $commenter, $user_identity); ?>
<?php else : ?>
<?php echo $args['comment_notes_before']; ?>
<?php
do_action('comment_form_before_fields');
foreach ((array) $args['fields'] as $name => $field) {
echo apply_filters("comment_form_field_{$name}", $field) . "\n";
}
do_action('comment_form_after_fields');
?>
<?php endif; ?>
<?php if ( is_user_logged_in() ) echo apply_filters('comment_form_field_comment', $args['comment_field']); ?>
<?php echo $args['comment_notes_after']; ?>
<p class="form-submit">
<input name="submit" type="submit" id="<?php echo esc_attr($args['id_submit']); ?>" value="<?php echo esc_attr($args['label_submit']); ?>" />
<?php comment_id_fields($post_id); ?>
</p>
<?php do_action('comment_form', $post_id); ?>
</form>

<?php endif; ?>
</div><!-- #respond -->

<?php do_action('comment_form_after'); ?>
<?php else : ?>
<?php do_action('comment_form_comments_closed'); ?>
<?php endif; ?>
<?php

لینک به ارسال

مطلب را ویرایش کنید

از بالای صفحه ویرایش روی تنظیمات بزنید و گفت و گوها را برای مطلب تیکدار کنید و چک کنید پذیرفتن دیدگاه. تیکدار باشه

برای مورد دیگتون هم به پیشخوان - تنظیمات - گفت و گو ها برید و برای نظرات تو در تو عدد دلخواه را بگذارید (البته احتمالا طراح قالب برای همین تعدادی که باز گذاشته استایل داده)

لینک به ارسال

مطلب رو ویرایش کردم، و تیک های مورد نظر رو فعال کردم، اما بازهم برای اون مطلب درست نشد

بنده هم احتمال میدم برای تعداد پاسخ تودرتو از برنامه نویسی طراح هست، راهی هست بشه این مورد رو اصلاح کرد؟

لینک به ارسال

پاسخ تو در تو رو احتمالا طراح در قالبی که برای نظرات ساخته به این شکل تعریفق کردته

در فایل comments.php یا functions.php این تعریف باید وجود داشته باشه ولی تغییر دادنش قطعا سایت را به هم می ریزه چون هیچ طراحی بی دلیل چنین محدودیتی رو اضافه نمی کنه

لینک به ارسال

اگر از پیشخوان - تنظیمات - گفت و گو ها تغییر در تعداد دیدگاه های تو در تو بی تاثیره بله رهاش کنید بهتره

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...