• Resolved alex1900

    (@alex1900)


    Hey,
    When I’m using the Header template all my changes to “header.php” vanishes.
    For example I have added the code to google analytics and when I disable my menu (header) it works but when I activate it again the code disappears and I can’t track visitors anymore.

    I’m using a footer and header and using “entire website”. I tried change to use only on pages but that didn’t solve the issue. When only using my footer the google analytic code works just fine. But when I activiate the header the code is then gone again.

    Is there any solution to this problem?

    Edit: If it helps I’m using Hello Elementor-theme with a child theme.

    Thanks for a great plugin, except this problem.

    • This topic was modified 3 years, 11 months ago by alex1900.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @alex1900

    The header footer plugin replaces the header and footer file from the theme and therefore the code gets removed.

    As of now, the only suggestion would be to either use the header or a footer from the theme where the code can be added.

    But thanks for bringing it to us, I’ll put forth your query to the development team and come up with a solution for this in upcoming updates.

    Regards,
    Rahul.

    Thread Starter alex1900

    (@alex1900)

    Thanks for your reply.

    I found this thread that had a similar problem.
    Even though it might not be the best solution it worked for me and solved the problem.

    If anyone got the same problem here is the code

    function your_prefix_add_meta_tag() {
    	?>
    
    	<!-- Your HTML Markup here -->
    
    	<?php
    }
    add_action( 'wp_head', 'your_prefix_add_meta_tag' );

    add that to your childs functions.php and it should work.

    Thanks again for a quick reply and a great plugin and maybe in the future there is another solution to this.

    • This reply was modified 3 years, 11 months ago by alex1900.

    Hello @alex1900

    Thanks for mentioning this hook here.

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Header conflict with header.php’ is closed to new replies.