Add_action to Pro header

If I want to insert something into the Pro header via the functions.php, how do I call the header?
add_action(‘x_integrity_header’) or something like that? Is there a resource somewhere that gives us this info?

Hello Jonathan,

Thanks for asking. :slight_smile:

You can add following code under child theme function.php file:

function third_party_tracking_code() { ?>

  <script>
    // Third party tracking code.
  </script>
<?php }

add_action( 'wp_head', 'third_party_tracking_code' );

For more information, you can take a look at following article.

Before making any changes, it’s a good idea to setup child theme. You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

Thanks.

Sorry if I wasn’t clear, but I meant into the actual header that I’ve built with the Pro Header Builder, not wp_head.

Hello Jonathan,

If you need to add something in your custom header, you may insert it within the Pro Header Builder if possible. And if it is necessary that your addition is above or below the custom header you have built in the builder, you can make use of this code as an example:

function my_new_action() {
  // Things the new action does.
}

add_action( 'action_name', 'my_new_action', 10 );

The action_name could be “x_after_masthead_begin”, “x_masthead” or “x_before_masthead_end”.

Hope this helps.

Thank you.

You’re welcome, glad we could help.

Cheers!

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