Title: Theme breakage on code install on header.php
Last modified: March 19, 2019

---

# Theme breakage on code install on header.php

 *  [samlindner19](https://wordpress.org/support/users/samlindner19/)
 * (@samlindner19)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/theme-breakage-on-code-install-on-header-php/)
 * 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](https://wordpress.org/support/users/see/) wanderers_mkdf_header_meta()–
   hooked with 10 * [@see](https://wordpress.org/support/users/see/) wanderers_mkdf_user_scalable_meta–
   hooked with 10 * [@see](https://wordpress.org/support/users/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”&gt](http://schema.org/WebPage”&gt);
   <?php /** * wanderers_mkdf_after_body_tag hook * * [@see](https://wordpress.org/support/users/see/)
   wanderers_mkdf_get_side_area() – hooked with 10 * [@see](https://wordpress.org/support/users/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](https://wordpress.org/support/users/see/) wanderers_mkdf_get_header()–
   hooked with 10 * [@see](https://wordpress.org/support/users/see/) wanderers_mkdf_get_mobile_header()–
   hooked with 20 * [@see](https://wordpress.org/support/users/see/) wanderers_mkdf_back_to_top_button()–
   hooked with 30 * [@see](https://wordpress.org/support/users/see/) wanderers_mkdf_get_header_minimal_full_screen_menu()–
   hooked with 40 * [@see](https://wordpress.org/support/users/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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftheme-breakage-on-code-install-on-header-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [samlindner19](https://wordpress.org/support/users/samlindner19/)
 * (@samlindner19)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/theme-breakage-on-code-install-on-header-php/#post-11328263)
 * 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 [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/theme-breakage-on-code-install-on-header-php/#post-11328860)
 * 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)

The topic ‘Theme breakage on code install on header.php’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/theme-breakage-on-code-install-on-header-php/#post-11328860)
 * Status: not resolved