How to Change Contact Form Thank You and Sorry Text in Zerif

Before proceeding with this article be sure to  create a child theme(click here), it is also important to mention that this is for the default contact form which comes with Zerif and this might not have any effect if you are using Pirate forms, we do however recommend you using Pirate forms since it integrates seamlessly into most our themes. Once you have created your child theme then copy the file called "front-page.php" from your parent theme folder to your child theme folder.

We are going to edit the font-page.php file which you placed in the child theme folder. Start by opening the file with your code text editor and search for block of code which looks like this:

if(isset($emailSent) && $emailSent == true) :

	echo '<p class="error white-text error_thanks">'.__('Thanks, your email was sent successfully!','zerif').'</p>';                            

elseif(isset($_POST['submitted'])):                                    

	echo '<p class="error white-text error_sorry">'.__('Sorry, an error occured. The email could not be sent.','zerif').'</p>';

endif;

This block of code might be around line 413 depending on the text editor you are using. To change the thank you message which shows after someone sends an email on your website then edit the text within the single quotes. You could also edit the message which shows when an email failed to send, here is an example of both messages edited:

if(isset($emailSent) && $emailSent == true) :

	echo '<p class="error white-text error_thanks">'.__('THANK YOU FOR YOUR EMAIL!','zerif').'</p>';                            

elseif(isset($_POST['submitted'])):                                    

	echo '<p class="error white-text error_sorry">'.__('SOMETHING WENT WRONG, PLEASE TRY AGAIN','zerif').'</p>';

endif;