Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Google Tag Manager for WordPress (after body tag hook needed)

Home / Forums / Pinnacle Theme / Google Tag Manager for WordPress (after body tag hook needed)

This topic is: Resolved
[Resolved]
Posted in: Pinnacle Theme
May 8, 2019 at 12:19 pm

I saw in another thread (a virtue one) some code with a hook for a function to add some php code after the body tag

add_action('init', 'custom_child_init');
function custom_child_init() {
add_action('virtue_after_body', 'custom_gtm4wp_support');
function custom_gtm4wp_support() {
if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); }
}
}

Do you have a version of this code for Pinnacle? I assume the virtue_after_body hook is unique to virtue

  • The forum ‘Pinnacle Theme’ is closed to new topics and replies.