• Today i tried to put the code for webmaster tools into my header.php file via the editor using the description here: https://managewp.com/how-to-set-up-your-wordpress-website-in-google-webmaster-tools

    i slotted the line of code immedieately below the <head> tag, and hit update file.

    Everything in the text input box deletes and the file save like that. empty.

    I have gone backwards in the browser, and copied all the code, and saved it in texteditor, so i have it (thank goodness), but every time i paste it in, and hit save, the whole thing deletes again.

    How can i fix this?

    here’s what some of the code looks like that i’m trying to put in:

    <!doctype html>
    <!--[if lt IE 7]> <html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8 lt-ie7" > <![endif]-->
    <!--[if IE 7]>    <html <?php language_attributes(); ?> class="no-js ie7 lt-ie9 lt-ie8"> <![endif]-->
    <!--[if IE 8]>    <html <?php language_attributes(); ?> class="no-js ie8 lt-ie9"> <![endif]-->
    <!--[if gt IE 8]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
    <head>
            <meta name="google-site-verification" content="36WiMc88_bgjQypIRVCRCWlxar70heFDWXWx23p0pZg" />
    
    	<meta charset="utf-8">
    
    	<title><?php ci_e_title(); ?></title>
    
    	<?php // CSS files are loaded via /functions/styles.php ?>
    
    	<?php // JS files are loaded via /functions/scripts.php ?>
    
    	<?php wp_head(); ?>
    
    </head>
    
    <body <?php body_class(); ?>>
    	<?php do_action('after_open_body_tag'); ?>
    
    <div id="wrapper">
    
    	<nav id="top-nav" class="group">
    		<?php
    			wp_nav_menu( array(
    				'theme_location' 	=> 'penelope_top_menu',
    				'fallback_cb' 		=> '',
    				'container' 		=> '',
    				'menu_id' 			=> '',
    				'menu_class' 		=> '',
    			));
    		?>
    	</nav><!-- /top-nav -->
    
    	<div id="page">
    
    		<?php if (ci_setting('beta_cap')=='enabled'): ?>
    			<img src="<?php echo get_child_or_parent_file_uri('/images/beta_'.basename(ci_setting('stylesheet'), '.css').'_cap.png'); ?>" alt="<?php _e('We\'re in beta!', 'ci_theme'); ?>" class="beta" />
    		<?php endif; ?>
    
    		<header id="header">
    			<hgroup id="hgroup">
    				<?php ci_e_logo('<h1>', '</h1>'); ?>
    				<?php ci_e_slogan('<h2>', '</h2>'); ?>
    			</hgroup>
    			<nav id="nav">
    				<?php
    					if(has_nav_menu('penelope_main_menu'))
    						wp_nav_menu( array(
    							'theme_location' 	=> 'penelope_main_menu',
    							'fallback_cb' 		=> '',
    							'container' 		=> '',
    							'menu_id' 			=> '',
    							'menu_class' 		=> 'main-nav'
    						));
    					else
    						wp_page_menu();
    				?>
    			</nav>
    		</header><!-- /header -->


    [Please use the code buttons (NOT single quotes) to post code]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The possibilities are:

    1. You don’t have enough file permission to actually save the file. See if the file permission is writable like 644.

    2. If it’s hosted on the server, the cache is keep on reverting the old file back. Contact your hosting to see if they can help you with this.

    Thread Starter bluetooth15

    (@bluetooth15)

    It seems that the problem has been resolved.

    Left it alone overnight, and I have now been able to change the code.

    Possibly it was occuring because the domain was being migrated from one host to another, and 24 hours had not passed. Now that it’s globally migrated, maybe its working normally?

    Well, that is possible, unless you’ve logged in using IP instead of domain name.

    But glad the issue is solved.

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

The topic ‘header.php file keeps getting deleted’ is closed to new replies.