Pro: How Do I Add Code to my header

I am trying to install code for a lead capture form from groovejar. It says to input it into my themes header between and but when I click on my header in pro to edit it this isn’t an option. How do I install a third party script in the header.php file for this theme? Simply inserting the script code as you would for other themes 503’d my site.

**EDIT **
Here is the solution - in order to add a script to your header you must go into the wp content folder and pull up functions.php for the pro theme. Once inside you edit the file and add this

/Add script on the of the site/
add_action( ‘wp_head’, ‘add_head_script’ );
function add_head_script() { ?>

Your Code Goes Here

<?php }

Hello @rsummar,

Thanks for asking. :slight_smile:

Please don’t make the mistake of adding the code directly into the theme files. Reason being when you update the theme those files will get overridden and the website flow might get broken. So that solution is to use Child Theme. We at Themeco provided ready to use Child theme that can be downloaded for free and then upon installation, you can proceed with the customisation. Please use following resources to install Child theme and setup child theme:

After that add following code in child theme function.php file.

 /*Adding a code inside the <head> tag*/
function my_custom_script() { ?>


 <?php }

 add_action( 'wp_head', 'my_custom_script', 999 );

Replace your code here with your code.

To learn more about wp_head() function, please take a look at following resource.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.