Support » Plugin: DuracellTomi's Google Tag Manager for WordPress » Theme breakage on code install on header.php

  • samlindner19

    (@samlindner19)


    Hi. I have previously added the Tag Manager code correctly and successfully on a different website simply by adding the code to the body tag of the header.php through the WP Admin Editor. It worked 100% fine. However I am having trouble on another theme for a different site (above). When trying to add it it seems to be breaker the header.php and I have to reload the previous version through the hosting admin file manager. It must be something to do with the theme. I am adding it to the parent theme (as the child theme has no header.php). The following is the code presently on the header.php, would you have a recommendation as to what is going on and where it should be exactly placed? As I have tried 3 locations and all breaks it.:

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <?php
    /**
    * wanderers_mkdf_header_meta hook
    *
    * @see wanderers_mkdf_header_meta() – hooked with 10
    * @see wanderers_mkdf_user_scalable_meta – hooked with 10
    * @see mkdf_core_set_open_graph_meta – hooked with 10
    */
    do_action( ‘wanderers_mkdf_header_meta’ );

    wp_head(); ?>
    </head>
    <body <?php body_class(); ?> itemscope itemtype=”http://schema.org/WebPage”>
    <?php
    /**
    * wanderers_mkdf_after_body_tag hook
    *
    * @see wanderers_mkdf_get_side_area() – hooked with 10
    * @see wanderers_mkdf_smooth_page_transitions() – hooked with 10
    */
    do_action( ‘wanderers_mkdf_after_body_tag’ ); ?>

    <div class=”mkdf-wrapper”>
    <div class=”mkdf-wrapper-inner”>
    <?php
    /**
    * wanderers_mkdf_after_wrapper_inner hook
    *
    * @see wanderers_mkdf_get_header() – hooked with 10
    * @see wanderers_mkdf_get_mobile_header() – hooked with 20
    * @see wanderers_mkdf_back_to_top_button() – hooked with 30
    * @see wanderers_mkdf_get_header_minimal_full_screen_menu() – hooked with 40
    * @see wanderers_mkdf_get_header_bottom_navigation() – hooked with 40
    */
    do_action( ‘wanderers_mkdf_after_wrapper_inner’ ); ?>

    <div class=”mkdf-content” <?php wanderers_mkdf_content_elem_style_attr(); ?>>
    <div class=”mkdf-content-inner”>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • samlindner19

    (@samlindner19)

    Ah it appears I may have solved it! I pasted it via the File Manager through my hosting admin panel instead of the header.php file through the WP Admin area and it seems to be stable now! Fingers crossed. Will mark as solved as soon as I finish some other testing.

    Plugin Author duracelltomi

    (@duracelltomi)

    Great to see you managed to add the necessary code 🙂
    Let me know if it works now!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.