• ianmh

    (@ianmh)


    I’m trying to use WordPress as a CMS and I’ve set up a feedback form using comments. We will then log in and look at the comments awaiting moderation . There is no need for them to ever be approved.

    That said I need a thank you for your feedback message, and I can’t seem to get it to work.

    I’ve tried this on my page.php before an if(is_page(‘my_feedback’))

    <?php foreach ($comments as $comment) : ?>
    	<?php if ($comment->comment_approved == 0) : ?>
        <h1>Thanks for your question!</h1>
        <?php endif; ?>
    <?php endforeach; ?>

    Does anyone have any idea how I could post a thank you message after the user posts?

    Thanks,
    Ian

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ianmh

    (@ianmh)

    Hate to bump, but anyone?

    moshu

    (@moshu)

    If it is a feedback form… wouldn’t be easier to use a contact plugin? They all have thankyou page.

    Also, look in the comments.php (default or classic, can’t remember) where it says: Your comment is awaiting moderation. Replace it with your text.

    Thread Starter ianmh

    (@ianmh)

    Thanks, good idea, I’ve tried the moderation thing, but it doesn’t seem to work for me. Was using the comments because they would just que up in word press and people could log in and check them.

    boober

    (@boober)

    I’ve tried the moderation thing, but it doesn’t seem to work for me.

    how does it not work? its just replacing text in a file. how can it not work?

    First of all, I’m opting for this, too, because I REALLY want to check comments IN admin – but I might just attempt at giving up and again looking for a plugin that WILL do that – any help?

    2nd: Boober, it doesn’t work, because of the “foreach” – and YES, it doesn’t work because it will show a thank you for every comment “posted” (or every one after deleted, if he will delete, but he could get more than one before he checks – I sure would).

    I have tried using different php code instead of the foreach code, and I can’t get it to work. I’m not a HUGE coder. What else will effectively redirect back to that spot (A), and (B) show just the one thank you message?

    IE: what would show the comments besides the foreach code, and only show the LAST one? (Except in our case, there won’t be any comment, just the thank you/moderation replacement text.)
    [personal remarks moderated]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Thank you message after comment’ is closed to new replies.