Title: Redirect after submit comment?
Last modified: August 19, 2016

---

# Redirect after submit comment?

 *  Resolved [starburst697](https://wordpress.org/support/users/starburst697/)
 * (@starburst697)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/redirect-after-submit-comment/)
 * I hope someone can help with this, I’ve tried all day to get this working with
   no luck. I’m trying to have the submit button for the comments box redirect the
   user to a “thank you” confirmation type page. I’ve tried the following code in
   the input with no luck:
 * <p class=”add_comment”>
    <input type=”hidden” name=”comment_post_ID” value=”<?
   php echo $id; ?>” /> <input type=”submit” name=”submit” value=”Add Comment”> 
   <input type=”hidden” name=”redirect_to” value=”index.php” /> </p> <?php do_action(‘
   comment_form’, $post->ID); ?>
 * When I add the redirect line, it only redirects, and doesn’t post the comment
   anymore. I’ve looked all over, and I can’t get it to work. I found this link:
 * [http://www.theblog.ca/wordpress-redirect-comment](http://www.theblog.ca/wordpress-redirect-comment)
 * And thought that I might have some luck using that plugin, but I’m not sure if
   I put the code for the message display in the right place since I haven’t had
   any luck with that either. Any help would be greatly appreciated, I’m about to
   throw my laptop on the ground. You can find my site [here](http://marynstrong.com/wp).

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

 *  [adamjb](https://wordpress.org/support/users/adamjb/)
 * (@adamjb)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/redirect-after-submit-comment/#post-1187238)
 * I just did this on my site: [http://gigglepixel.com](http://gigglepixel.com)
 * I haven’t looked into it too much, but I set the value of redirect_to to the 
   full url that I want to appear, in my case “[http://gigglepixel.com&#8221](http://gigglepixel.com&#8221);.
 * Hope this helps.
 * -A
 *  Thread Starter [starburst697](https://wordpress.org/support/users/starburst697/)
 * (@starburst697)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/redirect-after-submit-comment/#post-1187259)
 * It worked! I guess it wasn’t understanding the index.php. Thanks so much!

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

The topic ‘Redirect after submit comment?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [starburst697](https://wordpress.org/support/users/starburst697/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/redirect-after-submit-comment/#post-1187259)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
