Contact Form Template

All of our Premium WordPress Themes come with a built-in Contact Form included in a separate page template.

You can easily add the contact form you an existing page:

  1. Create new or open an existing page
  2. Right Column -> Page Attributes -> Template -> Select ‘Contact Page’
    contact template
  3. Cick on ‘Publish’ (or ‘Update’) button to save the changes
  4. Now when you open the Page, the contact form will be displayed:

contact form with captcha

Note: When the contact form is filled and submitted, it will send an email to the Admin Email (which is set to Admin Panel -> Left Menu -> Settings -> General -> Email Address).

You can customize the Google Map and the Right Sidebar:

  1. Navigate to Admin Panel -> Left Menu -> Appearance -> Customize
  2. Open ‘Contact Page’ section
  3. Update fields for Google Map and Right Content Area

You can also add a CAPTCHA to your Contact Form:

  1. Download the Really Simple CAPTCHA PluginSource: https://wordpress.org/plugins/really-simple-captcha/
  2. Upload the plugin to Your WordPress site (Admin Panel -> Left Menu -> Plugins -> Add New)
  3. Install and Activate the plugin.

How to Change the Email Subject in Your Contact Page Template

If you want to customize the subject line of the emails you receive from your website’s contact form, you can easily do so by editing the contact page template directly from your WordPress Admin Panel. This guide will walk you through the simple steps to set a hardcoded email subject.

1. Access the Theme Editor

  1. Log in to your WordPress Admin Panel.
  2. Navigate to the Left Menu and click on Appearance.
  3. From the dropdown menu, select Theme Editor.Note:

2. Locate the page-contact.php Template File

  1. On the right side of the Theme Editor, you’ll see a list of theme files.
  2. Scroll down to find the page-templates/page-contact.php file.
  3. Click on page-contact.php to open it in the editor.

3. Find the Email Sending Code

  1. In the editor, scroll down to locate the line of code that sends the email. You’re looking for a line that contains wp_mail.
  2. The code should look like this:

    wp_mail( $emailTo, __( '[Contact Form] ', 'tishonator' ).$subject, $body, $headers );

    This line sends the email with the subject line that includes [Contact Form] and the subject entered by the user.

4. Modify the Email Subject to a Hardcoded Value

  1. To set a fixed subject line for all emails from the contact form, replace the existing wp_mail line with the following code:

    wp_mail( $emailTo, 'New Contact Form Message', $body, $headers );

    Replace 'New Contact Form Message' with the exact subject line you want to use.

    Example:

    wp_mail( $emailTo, 'Website Inquiry', $body, $headers );

That’s it. Then simply save changes you made to the file.

Additional Tips & Tricks

How to Change ‘project’ Slug Name

We include Projects as a custom post type in many of our WordPress themes. It is a useful custom type of data which allows you to organize your website content and display it as a block and single projects page.

In some cases you may want to rename the ‘projects’ slug (the part ‘projects’ in single projects URL i.e. https://yoursite.com/projects/some-project-name/) it to another word. It will require some code changes. Here are all of the necessary steps:

1.Login to your Admin Panel

2. Navigate to Left Menu -> Appearance -> Theme Editor

3. Open functions.php

4. Rename the following occurrences of ‘project’ to ‘your_new_name’:

register_post_type( 'project', $args );
$data = get_post_meta($post->ID, 'project', true);
if ( 'project' != get_post_type( $post_id ) )
update_post_meta( $post_id, 'project', $data );
add_meta_box( 'project_metabox', 'Class Information', 'tishonator_add_class_fields', 'class' );
if ($post_type == 'project') {

5. The same rename of ‘class’ needs to be applied in file inc/blocks.php

$projectsArgs = array( 'post_type' => 'project', 'posts_per_page' => $count);
$data = get_post_meta( $r->post->ID, 'project', true );

6. And the same rename of ‘project’ needs to be applied in file single-project.php

$data = get_post_meta( get_the_ID(), 'class', true );

8. Also, you need to connect via FTP to your site /public_html/yoursite/wp-content/themes/yourtheme and rename file: single-project.php to your single-yournewname.php

Please Note: After the above change, all of the existing Projects in Admin Panel -> Left Menu -> Projects will disappear and they needs to be recreated again.