Email in header contact section


#1

In the Appearance | Customize | Extra Options | Header Contact Info you can put an email address. Is there away to have the visitor to click and then it goes to the Contact Us page where they can fill in their information?


#2

Hello there,

Thank you for reaching out to us here. To accomplish it, try doing the below steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
    jQuery(function($) {

      if( $('.header-contact-info .header-email').length ) {

        var link = 'http://yoursite.com/contact';

        $('.header-contact-info .header-email').wrapInner('<a href="' + link + '"></a>');
        $('.header-contact-info .header-email').find('a[href*="mailto"]').attr('href', link);

      }

    });
  1. Update

Flush any applied cache as it often blocks new code addition to take changes. https://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens

Regards,
Kharis