• Resolved guru4ever

    (@guru4ever)


    Hi,

    am using twenty eleven theme for my site development.when am posting comments as a user it says “your comment is waiting for approval”.
    i want to hide the comments that is waiting for approval and unapproved comments how can i do that..help needed immediately

    Thanks

    [moved to ‘Themes and Templates’]

Viewing 7 replies - 1 through 7 (of 7 total)
  • only logged in admins see unapproved or pending comments

    you can log out of your admin acct, to test this

    Thread Starter guru4ever

    (@guru4ever)

    I have tested by logging out of admin act but still the message is displaying …

    you don’t want the actual message displaying?
    won’t that confuse the commenter when the comment doesn’t show up immediately?

    Thread Starter guru4ever

    (@guru4ever)

    no i don’t want the message is displayed. it will be problem if somebody posts some unwanted comments that’s why am trying to hide the messages.any idea…

    look in theme’s content.php

    you should create a child theme
    https://codex.www.ads-software.com/Child_Themes

    Thread Starter guru4ever

    (@guru4ever)

    Hi,

    Finally i have solved the issue. i have just hide the unapproved comments message . in themes function.php
    <?php if ( $comment->comment_approved == ‘0’ ) : ?>
    <em class=”comment-awaiting-moderation”><?php _e( ‘Your comment is waiting for approval.’, ‘carnatic’ ); ?>

    <?php endif; ?>
    <div class=”comment-content”><?php comment_text(); ?></div>

    </footer>

    intead of above code i have done small modification check below..
    <?php if ( $comment->comment_approved == ‘0’ ) : ?>
    <em class=”comment-awaiting-moderation”><?php _e( ‘Your comment is waiting for approval.’, ‘carnatic’ ); ?>

    <?php else :?>
    <div class=”comment-content”><?php comment_text(); ?></div>
    <?php endif; ?>

    </footer>

    Thanks

    Twenty Eleven only displays pending comments to the comment author, and to site admins.

    I have tested by logging out of admin act but still the message is displaying

    Apparently, WordPress still recognized you as the comment author.

    Try having someone else, on a different computer/different IP address, post a comment that is held for moderation, and verify whether or not you can see the comment when you are logged out.

    p.s. why are you using the ‘carnatic’ textdomain, if you’re using Twenty Eleven?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘hiding unapproved comments in twentyeleven’ is closed to new replies.