Need Help Adding Pinterest Tag for Promoted Pins

To do promoted pins on Pinterest (aka ads), there needs to be a few things installed…

  1. The base code.
    And it should be “between the and tags in your HTML document. It should only appear once on a single page, and before the subsequent event code.”

  2. The event code
    You add the event code on each page that you want to track conversions and must be listed after the base code.

There are different event codes I can use but the main question I have is how do I add event codes to specific pages in my child theme? I’ve already got that installed and was in the functions.php editor but how do I indicate codes for specific pages?

The theme doesn’t make it very easy to edit header script and these codes need to technically be in the headers. And my coding knowledge is very, very little.

If I do it under functions.php of the X child theme, do I input the base code underneath this section below? :

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );

I tried downloading the Insert Header and Footer WP plug-in - can I use that instead? Is it easier? And if so, then how do I specify certain codes for certain pages with that?

Either way, I’d just love to know how to ensure I installed the base code correctly and then how I install the event codes on multiple pages.

Thank you SO much and I hope this makes sense!

Hello There,

Thanks for writing in!

  • To insert the base code in your header area, please install the “Insert Headers and Footers” plugin. You should be able to insert the base code in Settings > Insert Headers and Footers > Header

  • For your event code, you can edit your page that you want to track in Cornerstone. Make use of the Cornerstone’s custom JS section and insert the event code.

Please be informed that only PHP codes can be added in your child theme’s functions.php file. Any code that is not a valid and correct php code will trigger a fatal error and might messed your site.

Hope this helps.

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