مشکل در نمایش نظرات وردپرس

MahdiY

راهبر انجمن
با سلام

من یه قالب طراحی کردم

حالا نظرات جدید را نشون میده اما نظرات قبلی را خیر

نظرات قبلی در پاپ آپ داده شدند

چیکارش کنم ؟

مشکل از کدوم فایل هست ؟

 

MahdiY

راهبر انجمن
البته متوجه یه چیز همین حالا شدم

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

 

Mohammad

مدیر انجمن
پرسنل مدیریت
امکانش هست کدی که استفاده کردی رو اینجا بزاری.

 

MahdiY

راهبر انجمن
بفرمایید اینم کد


کد:
<?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!');

    if ( post_password_required() ) { ?>
        <p class="nocomments">این مطلب خصوصی است.در صورتی که رمز آن را دارید در قسمت زیر وارد کنید.</p>
    <?php
        return;
    }
?>

<!-- You can start editing here. -->
<div class="comments" id="comment">
<?php if ( have_comments() ) : ?>
    <h3 id="comments"><?php comments_number('این نوشته هنوز دیدگاهی ندارد.', 'یک دیدگاه نوشته شده است!', '% دیدگاه نوشته شده است!' );?> می توانید دیدگاه خود را بنویسید</h3>


    <ol class="commentlist">
    <?php wp_list_comments(); ?>
    </ol>

 <?php else : // this is displayed if there are no comments so far ?>

    <?php if ('open' == $post->comment_status) : ?>
        <!-- If comments are open, but there are no comments. -->
<?php wp_list_comments(); ?>






     <?php else : // comments are closed ?>
        <!-- If comments are closed. -->
        <p class="nocomments">نظرات بسته شده است.</p>

    <?php endif; ?>
<?php endif; ?>


<?php if ('open' == $post->comment_status) : ?>

<div id="respond">

<h3><?php comment_form_title( 'دیدگاه خود را به ما بگویید.', 'دیدگاه خود را به ما بگویید %s' ); ?></h3>


<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>شما باید <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">وارد سایت شوید</a> تا بتوانید نظر دهید.</p>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if ( $user_ID ) : ?>

<p>وارد شده به نام <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">خروج »</a></p>

<?php else : ?>

<p><input type="text" name="author" id="author" placeholder="نام" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /></p>
<br><br><br>
<p><input type="text" style="text-align:left" placeholder="ایمیل" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
</p>

<?php endif; ?>

<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->

<p><textarea name="comment" id="comment" placeholder="نظر خود را وارد کنید" cols="45%" rows="10" tabindex="4" style="resize:none;"></textarea></p>

<p><input name="submit" type="submit" id="submit" tabindex="5" value="ثبت نظر" /><br><br>
<?php comment_id_fields(); ?>
</p>
<?php do_action('comment_form', $post->ID); ?>

</form>

<?php endif; // If registration required and not logged in ?>
</div>

<?php endif; // if you delete this the sky will fall on your head ?>
</div>
 

MahdiY

راهبر انجمن
آقا محمد میشه زود بررسی کنید

قالبم رو هوا مونده

 

Mohammad

مدیر انجمن
پرسنل مدیریت
کد مشکلی نداره!...

شما اون فایل popup رو هم بزار تا ببینم از چه تابعی استفاده کرده.

 

MahdiY

راهبر انجمن
اینم کد پنجره پاپ آپ :


کد:
<?php
_deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
     <title><?php printf(__('%1$s - Comments on %2$s'), get_option('blogname'), the_title('','',false)); ?></title>
<style>
@font-face {
  font-family: 'BYekan';
  src: url('http://seyhoon.ir/wp-content/themes/interfilm/BYekan.eot?#') format('eot'),  /* IE6–8 */
       url('http://seyhoon.ir/wp-content/themes/interfilm/BYekan.woff') format('woff'),  /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
       url('http://seyhoon.ir/wp-content/themes/interfilm/BYekan.ttf') format('truetype');  /* Saf3—5, Chrome4+, FF3.5, Opera 10+ */
}

body{background:url(image/bg.jpg) repeat; margin:0px auto;font-family:"BYekan";}
#decode-menu{
    font-family:"BYekan";
    font-size:13px;
    color:#fff;
    background-color:#09F;
    display:inline;
    border-radius:5px;
    padding:2px 3px;
    float:right;
    position:relative;
    top:-22px;
    text-shadow:0px 1px 1px #000;
}

a, a:visited {text-decoration:none;}
a:hover { opacity:0.5; border-radius:5px;}

.main{
    margin:0px auto;
    width:300px;
    height:100%;
    background-color:#F3F3F3;
    padding:10px;
    border-radius:10px;
    box-shadow:1px 1px 2px #000;
    text-align:center;
    font-family:"BYekan";
}

ul, li {
    list-style-type: none;
}

#decode{
    float:center;
    padding:10px;
    margin:10px;
    background-color:#E6F2FF;
    border:1px solid #8AC5FF;
    border-radius:10px;
    font-family:"BYekan";
}

#codex-menu{
    font-family:"BYekan";
    font-size:13px;
    color:#fff;
    background-color:#FC0;
    display:inline;
    border-radius:5px;
    padding:2px 3px;
    float:right;
    margin-top:-23px;
    text-shadow:0px 1px 1px #000;
}

.sum {
    font-family:"BYekan";
    font-size:13px;
    position:relative;
    left:130px;
}

#decoded, #encoded{
    text-align:center;
    margin:0px auto;
}
#decoded p, #encoded p{
    font-family:"BYekan";
    font-size:23px;
    color:#0C0;
    text-shadow:0px 1px 1px #000;
    direction:rtl;
}
#encode{
    float:center;
    padding:10px;
    margin:10px;
    background-color:#FFD9D9;
    border:1px solid #FF9B9B;
    border-radius:10px;
}

#encode-menu{
    font-family:"BYekan";
    font-size:13px;
    color:#fff;
    background-color:#FF3C3C;
    display:inline;
    border-radius:5px;
    padding:2px 3px;
    float:right;
    margin-top:-23px;
    text-shadow:0px 1px 1px #000;
}
</style>
</head>
<body id="commentspopup"><center>
<?php
/* Don't remove these lines. */
add_filter('comment_text', 'popuplinks');
if ( have_posts() ) :
while( have_posts()) : the_post();
?>

<?php if ( pings_open() ) { ?>
<p><?php printf(__('The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em>%s</em>'), get_trackback_url()); ?></p>
<?php } ?>

<?php
// this line is WordPress' motor, do not delete it.
$commenter = wp_get_current_commenter();
extract($commenter);
$comments = get_approved_comments($id);
$post = get_post($id);
if ( post_password_required($post) ) {  // and it doesn't match the cookie
    echo(get_the_password_form());
} else { ?>

<?php if ($comments) { ?>
<ul id="commentlist" class="main">
<?php foreach ($comments as $comment) { ?>
<? $authorId = $comment->user_id;
if($authorId == 3){ ?>
<li id="comment-<?php comment_ID() ?>">

    <p><cite><?php printf(__('<div id="encode-menu"> %1$s — %2$s @ %4$s</div>'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite><div id="encode"><?php comment_text() ?></div></p><br><br>
    </li>
<? } 

if ($authorId != 3){ ?>
    <li id="comment-<?php comment_ID() ?>">

    <p><cite><?php printf(__('<div id="decode-menu"> %1$s — %2$s @ %4$s</div>'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite><div id="decode"><?php comment_text() ?></div></p><br><br>
    </li>

<?php }} // end for each comment ?>
</ul>
<?php } else { // this is displayed if there are no comments so far ?>
    <p><?php _e('بدون نظر!'); ?></p>
<?php } ?>

<?php if ( comments_open() ) { ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
    <p><?php printf(__('<a href="%1$s">%2$s</a>'), get_edit_user_link(), $user_identity, wp_logout_url(get_permalink())); ?></p>
<?php else : ?>
    <p>
      <input type="text" name="author" id="author" class="textarea" value="<?php echo esc_attr($comment_author); ?>" size="20" tabindex="1" />
       <label for="author"><?php _e('Name'); ?></label>
    </p>

    <p>
      <input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="20" tabindex="2" />
       <label for="email"><?php _e('E-mail'); ?></label>
    </p>

    <p>
      <input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="20" tabindex="3" />
       <label for="url"><?php _e('<abbr title="Universal Resource Locator">URL</abbr>'); ?></label>
    </p>
<?php endif; ?>

    <p>
      <label for="comment"><?php _e('Your Comment'); ?></label>
    <br />
      <textarea name="comment" id="comment" cols="40" rows="4" tabindex="4"></textarea>
    </p>

    <p>
      <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
      <input type="hidden" name="redirect_to" value="<?php echo esc_attr($_SERVER["REQUEST_URI"]); ?>" />
      <input name="submit" type="submit" class="sum" tabindex="5" value="<?php esc_attr_e('Say It!' ); ?>" />
    </p>
    <?php do_action('comment_form', $post->ID); ?>
</form>
<?php } else { // comments are closed ?>
<p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
<?php }
} // end password check
?>

<div><strong><a href="javascript:window.close()"><?php _e('Close this window.'); ?></a></strong></div>

<?php // if you delete this the sky will fall on your head
endwhile; // have_posts()
else: // have_posts()
?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<!-- // this is just the end of the motor - don't touch that line either  -->
<?php //} ?>

</script>
</center>
</body>
</html>
 

MahdiY

راهبر انجمن
آقا محمد به دادم برس

دیگه نظرات جدید هم نمایش داده نمیشه

 

Mohammad

مدیر انجمن
پرسنل مدیریت
کمکی از دست من بر نمیاد

قالبت رو کامل پ.خ کن بررسی کنم

 

MahdiY

راهبر انجمن
وای بر من

اصلا نظرات را در مطالب جابجا نشون میده

یوزر و پس بدم ؟

 

Mohammad

مدیر انجمن
پرسنل مدیریت
اگر میتونید ارسال کنید در لوکال تست کنم

 
بالا