پاسخ دادن به نظرات

Roach

Well-Known Member
سلام دوستان.من این قالبی که روی سایتم نصبه امکان پاسخ گویی به نظرات رو در خود پست نداره!اما بقیه قالب ها داره.کدی چیزی نیست که بذارم؟اینم کده comments.php

کد:
<?php // Do not delete these lines
    if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
        die ('Please do not load this page directly. Thanks!');

    if (!empty($post->post_password)) { // if there's a password
        if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
            ?>

            <p class="nocomments">This post is password protected. Enter the password to view comments.</p>

            <?php
            return;
        }
    }

    /* This variable is for alternating comment background */
    $oddcomment = 'class="alt" ';
?>

<!-- You can start editing here. -->

<?php if ($comments) : ?>


    <?php foreach ($comments as $comment) : ?>



    <div class="comment" <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
    <div class="comment-title">
        <h3><?php comment_author_link() ?> گفته است :</h3>
    </div>
    <div class="comment-content">
    <div id="comment">
    <?php if ($comment->comment_approved == '0') : ?>
    <em>نظر شما منتظر بررسي خواهد ماند</em>
     <?php endif; ?>
    
    <div style="width:100px;float:right">
        <?php
        $author_email = get_the_author_email();
        echo get_avatar($author_email, '96');
        ?>
    </div>
    <div style="width:380px;float:right">
        <?php comment_text() ?><br><?php cancel_comment_reply_link(''); ?>
    </div><div class=clear></div>
    </div>
    </div>
    </div><div class=clear></div>



    <?php
        /* Changes every other comment to a different class */
        $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
    ?>

    <?php endforeach; /* end for each comment */ ?>

    

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

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


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

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?>


<div class="addcomment">


<h3><span>ارسال نظر</span></h3>

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

        <label for="author">نام شما :</label>
        <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>"  tabindex="1" class="c-input" />
        <div class="clear"></div><br>
        <label for="email">ایمیل :</label>
        <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" class="c-input" />
        <div class="clear"></div><br>
        <label for="url">وب سایت :</label>
        <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>"  tabindex="3" class="c-input" /><br>
        <br>
        <div>
        <label for="comment">متن و پیام شما : </label><textarea name="comment" id="text" tabindex="4"></textarea>
        </div>
    </div>
<div class=clear></div>
<input class="comment_button" name="submit" type="submit" id="submit" tabindex="5" value="ارسال نظر " />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    </form></div>







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

<?php endif; // if you delete this the sky will fall on your head ?></font face="Tahoma" style="font-size: 11px">
 

VAHID216

مدیر بازنشسته
با سلام خدمت شما دوست عزیز
یه توضیح بدم خدمتتون در مورد کلا انجمن ها ، انجمن ها سیستم چت نیستند که سریعا پیغام بزنید و جواب بگیرید. باید حداقل طبق استاندارد جهانی 24 ساعت صبر کنید.
این کد رو هر جا اضافه کنید نظرات نمایش داده می شه :
کد:
<?php comments_template(); ?>
موفق باشید
 

جدیدترین ارسال ها

بالا