WordPress.org

Support

Support » How-To and Troubleshooting » Comment approval problem!!

Comment approval problem!!

  • Hello! In the blog that i am making, there is an issue with the comment approval. When you comment on a post, it posts the comment and then beside it it says: “This will not be published before its approved” (but in Swedish). Also that text is put beside EVERY each comment. But i dont want it to post the comment at all, id like the page to display all the other comments and on the bottom say: “Your post will be displayed when its approved”.

    In short, i dont want unapproved comments to be shown. Here is a part of the code from the comments.php page (since i dont have the page uploaded to the net yet):

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

    <b>” target=”_blank”><?php comment_author() ?></b>
    <?php if ($comment->comment_approved >= ‘0’) : ?>
    YOUR COMMENT WILL NOT BE DISPLAYED UNTIL ITS APPROVED!
    <?php endif; ?>

    <div class=”commentext”>
    <font color=”#333333″ face=”arial” size=”2″><?php comment_text() ?></font>
    <small class=”commentmetadata”>” title=””><?php comment_date(‘Y-m-d’) ?>   <?php comment_time(‘H:i:s’) ?> <?php edit_comment_link(‘edit’,’  ‘,”); ?></small>

    <font color=”#000000″ size=”2″>URL: ” target=”_blank”><u><?php comment_author_url() ?></u></font>

    </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”>Comments are closed.</p>

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

    THANKS FOR ALL HELP!

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    If I understand this correctly, the unapproved comment isn’t published – i.e. only you can see it because you’re logged in.

    cocopops

    @cocopops

    yes exactly! but its the person who comments it that sees it (they dont have to be a user to be able to comment).

    but i dont want them to see it either, because then they MIGHT think that it IS published! so i just want a text where it says that the comment WILL be published after approval! and that ONLY!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comment approval problem!!’ is closed to new replies.