رفتن به مطلب

نمایش داده نشدن نظرات ارسالی


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

با عرض سلام خدمت دوستان و اساتید

یه مشکلی تو سایت دارم اینه که وقتی نظری ارسال میشه ، حتی پس از پذیرفته شدن تو سایت نمایش داده نمیشه

ممنون میشم هر چه زودتر کمک کنید

این کد رو تو فایل single.php گذاشتم


<?php include (TEMPLATEPATH . "/comments.php"); ?>

این کد فانکشن


function animationiha_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment; ?>
<article class="CommentSet" id="li-comment-<?php comment_ID() ?>">
<div class="CmAuthor">
<div class="AuthorName">
<?php comment_author_link();?>
</div>
<div class="DateOfCmText">
<a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s', 'animationiha'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link('('.__('edit', 'animationiha').')',' ','') ?></div>
</div>
<div class="clear"></div>
<div class="AuthorText">
<?php comment_text() ?>
<div class="clear"></div>
<div id="ReplyKey"><?php
comment_reply_link(array_merge( $args, array( 'before' => '','after' => '','depth' => $depth, 'max_depth' => $args['max_depth']))) ?></div>
<div class="clear"></div>
</div>
</article>
<?php
}
?>

و این کد comments.php


<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
?>
<article class="CommentBox">
<section class="Cm-Top-Counter">
<div class="icon">
</div>
<h3>
<?php comments_number(__('No comments have been posted','animationiha'), __('<span>1</span> comments have been posted','animationiha'), __('<span>%</span> comments have been posted','animationiha') );?>
</h3>
<a href="#CmForm" ><?php _e('you post a comment','animationiha'); ?></a>
<div id="OpenCloseCm" onclick="OpenAndCloseCM()"></div>
</section>
<article class="content" id="CmContent">
<?php if ( have_comments() ) : ?>
<section class="comments">
<?php wp_list_comments("callback=animationiha_comments");?>
</section>

<?php else : // this is displayed if there are no comments so far ?>
<section class="AddComment">
<?php if ( comments_open() ) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<div class="comment-info"><?php _e('comments are closed','animationiha'); ?></div>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<?php if ($comment->comment_approved == '0') : ?>
<div class="comment-info"><?php _e('Your comment will be displayed after approval','animationiha'); ?></div>
<br />
<?php endif; ?>
<br>
<?php if ( post_password_required() ) { ?>
<div class="comment-info"><?php _e('comments need password','animationiha'); ?></div>
<?php
return;
}
?>
<?php endif; ?>
<h1 id="CmForm"><?php _e('send comment','animationiha'); ?></h1>
<form action="<?php bloginfo('url'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if (is_user_logged_in()) : { ?>
<p style="font-size:12px;"><?php _e('you post comments by name','animationiha'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a> <?php _e('will be post','animationiha'); ?> <a style="font-size:11px;" href="<?php echo wp_logout_url(get_permalink()); ?>"><?php _e('logout','animationiha'); ?> »</a></p>
<?php } else : ?>
<label for="author"><?php _e('your name','animationiha'); ?> : </label><br clear="all">
<div class="Cover">
<span style="float:right; position:absolute; margin-top:10px; margin-right:6px;" class="livicon" data-n="user" data-s="19" data-c="#999" data-parent="true" data-hc="false"></span>
<input value="<?php echo esc_attr($comment_author); ?>" type="text" class="input" id="author" name="author"/>
</div>
<label for="email"><?php _e('email','animationiha'); ?> : </label><br clear="all">
<div class="Cover">
<span style="float:right; position:absolute; margin-top:10px; margin-right:6px;" class="livicon" data-n="mail" data-s="19" data-c="#999" data-parent="true" data-hc="false"></span>
<input type="text" value="<?php echo esc_attr($comment_author_email); ?>" class="input" id="email" name="email"/>
</div>
<label for="url"><?php _e('website','animationiha'); ?> : </label><br clear="all">
<div class="Cover">
<span style="float:right; position:absolute; margin-top:10px; margin-right:6px;" class="livicon" data-n="link" data-s="19" data-c="#999" data-parent="true" data-hc="false"></span>
<input type="text" value="<?php echo esc_attr($comment_author_url); ?>" class="input" id="url" name="url"/>
</div>
<?php endif; ?>
<label for="comment"><?php _e('your comment','animationiha'); ?> : </label><br clear="all">
<textarea name="comment" id="comment" class="Message"></textarea>
<div class="cancel-reply">
<?php cancel_comment_reply_link(); ?>
</div>
<input name="Submit"
type="submit" id="submit"
class="button" value="<?php _e('send comment','animationiha'); ?> ">
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
</form>
<div class="CommentRules">
<h4><span><?php _e('please follow this notes','animationiha'); ?> </span></h4>
<ul>
<li><?php _e('Your comment will be displayed after approval','animationiha'); ?></li>
<li><?php _e('please post comment just for this post','animationiha'); ?></li>
</ul>
</div>
<?php endif; // if you delete this the sky will fall on your head ?>
</section>
</article>

لینک به ارسال

سلام

شما این کد رو

<?php comments_template(); ?>

جایگزین کنید تو سینگلتون

نتیجه رو اعلام کنید

سلام

این بار نظرات رو نشون داد ولی فرم رو نشون نمیده

لینک به ارسال

واسه اینکه شما احتمالا با یوزر وارد شدید

یک بار خارج بشید از پنلتون تست کنید

نه هیچ تاثیری نداشت

ویرایش شده توسط hamid_khaleghi
لینک به ارسال

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

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

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

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

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

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

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

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

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