Home » Wordpress » How to redirect to a thankyou page after contact form submission – WordPress premium theme contact us php template [closed]

How to redirect to a thankyou page after contact form submission – WordPress premium theme contact us php template [closed]

Posted by: admin November 30, 2017 Leave a comment

Questions:

I am working on a WordPress Theme and I am trying to get the custom contact form that came with the theme to redirect to a thank you page after successful completion so I can use adwords conversion tracking.

Although I’ve looked through Stackflows previous questions/answers on this topic, I’m struggling to find the right code / solution to my problem (To be frank I have very little knowledge of code). I would be very greatful for any help with this! Here’s the code…

Apologies for posting all the code (related to not having a clue) but I’m not sure which bits are relevant/requiring changing. Many thanks in advance for any help!

Answers:

What would you like to achieve exactly? After the confirmation email is sent you want to redirect the user to a complete different page?
You can do that in PHP and it will be as simple as replacing the line:

with something like this:

Or you could use javascript/jquery to redirect the user after a couple of seconds after showing the “email was successfully sent” message.

Leave a Reply

Your email address will not be published. Required fields are marked *