• Havihg problem placing the <meta name=”google etc…….. into the theme head section, header.php. to verify my site on webmaster tools.

    I get the pop up: “Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP”.

    At this point I am lost. Any help would be welcome.

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

Viewing 1 replies (of 1 total)
  • Hello secretfocus,

    You have to add that google analystics into header.php file between <head> tag.

    Example.

    <head>
    	<?php
    	/**
    	 * Hook - photo_perfect_action_head.
    	 *
    	 * @hooked photo_perfect_head -  10
    	 */
    	do_action( 'photo_perfect_action_head' );
    	?>
    
    	<?php wp_head(); ?>
    	<meta name=”google etc……
    </head>

    or

    Add below code into your current active theme’s functions.php file

    function google_analytics_code() {
    	?>
    	<meta name=”google etc……
    	<?php
    }
    
    add_action('photo_perfect_action_head', 'google_analytics_code');

    Note : All Changes you done in funtions.php or header.php or other file are gone when you update theme. So prefer Child Theme

    Hope this will helps you.

    Thanks !

Viewing 1 replies (of 1 total)

The topic ‘Google analytics code – where to enter it’ is closed to new replies.