Parse error: syntax error
-
Hi There,”
Something terrible has happened ~ I was trying to upgrade the Google Analytics on my site so I could view the demopgraphics of my visitors… I was carefully following the steps and I had to copy and paste some code into the front page of my site.
From what I could understand, I thought this code should have gone into the header.php page in editor of the corpo theme. This didn’t work (the validation page on google analytics told me there was an error) and as it was late at night I needed to finish up my work for the day.
I removed the code from the header.php page (no I didn’t make an initial backup of the code on that page ~ I know I really should have)
I have come back to look at my website a few days later I am met with this error ~
Parse error: syntax error, unexpected T_STRING in /home2/dcyber/public_html/makeupartistrycairns.com.au/wp-content/themes/corpo/header.php on line 8I can’t see any page on my website, only that line … 🙁
So, I’m thinking the problem may be down to either of the following;
A) Perhaps I deleted some extra code from the header.php page that I shouldn’t have (before you ask me, nope, I didn’t create a backup ~ I know I should have)
or
B) as the wheels have already been set in motion with the process of upgrading google analytics to Universal Analytics ~ in the upgrade guide, I have read that you can’t stop the process or revert to a previous version of Google Analytics ~ perhaps this error is showing because the process is incomplete…I think point A) is the reason
Can I post my header.php page code here for someone to help me please?
Or if anyone has any better idea of what has gone wrong I would be most grateful.
Code pasted below in backticks ~ Many thanks in advance if someoone has the time or inclination to help …<!DOCTYPE html> <html <?php language_attributes(); ?> class="no-js"> <head> <meta charset="<?php bloginfo('charset'); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <title><?php wp_title(); ?></title> <?ph p wp_head(); ?> </head> <?php if ( is_front_page() && of_get_option('corpo_hp_style') == 1 ) { $class = 'custom-front'; } else { $class = ''; } ?> <body <?php body_class($class); ?>> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=142049122537841"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div id="wrapper"> <div id="top-bar"> <div class="right"> <?php corpo_social_icons(); ?> </div> <?php if ( of_get_option('corpo_social_phone') ) : ?> <div class="left"><?php _e('Call us at','corpo'); ?> <?php echo of_get_option('corpo_social_phone'); ?></div> <?php endif; ?> </div> <!-- header --> <header id="header"> <div id="header-inner"> <div id="logo"> <?php if (of_get_option('corpo_logo_image')) : ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="logo-img"><img src="<?php echo of_get_option('corpo_logo_image'); ?>" alt="<?php bloginfo( 'name' ); ?>" /></a> <?php else : ?> <h1 id="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><?php bloginfo('name'); ?></a></h1><p class="site_tagline"><?php bloginfo('description'); ?></p> <?php endif; ?> </div> <!-- navigation --> <nav id="main-nav" role="navigation"> <?php if(has_nav_menu('main-menu')){ wp_nav_menu(array( 'theme_location' => 'main-menu', 'container' => false, 'menu_class' => 'menu', 'menu_id' => 'main-menu', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 0, 'walker' => '' )); }else { ?> <ul class="nav" id="main-menu"> <?php wp_list_pages('title_li='); ?> </ul> <?php } ?> </nav> <!-- END navigation --> </div> </header> <!-- END #header --> <?php $home_style = ''; if ( ( get_option( 'show_on_front' ) == 'posts' || get_option( 'show_on_front' ) == 'page' ) && (int)of_get_option('corpo_hp_style') != 1 ) { $home_style = 'posts'; } if ( !is_front_page() || $home_style == 'posts' ) : ?> <div id="content-wrapper"> <?php endif; ?>
The topic ‘Parse error: syntax error’ is closed to new replies.
