Added my facebook pixel code between the header tags on my header.php theme file and now my website is all screwed up and not displaying properly. I tried deleting the facebook pixel code and saving but the website still remains screwed. I'm positive I only deleted the pixel code but I'm scared there's a possibility I may have deleted a small portion of code as well.
I want to try and restore a previous version of the header.php file on Worpress.
Also open to other idea on how to fix this. Thanks!
Here is the header.php code - I am trying to insert the Facebook Pixel code inbetween the header tags. There is also a Google Tag Manager piece of code after the header tags that I haven't included because it doesn't appear correct when copied and pasted into the code below:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<?php if (is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<title><?php
//Yoast SEO Plugin
if (defined('WPSEO_VERSION')) {
wp_title('');
} else {
//The blog name.
bloginfo( 'name' );
//Print the <title> tag based on what is being viewed.
wp_title( '|', true, 'left' );
//Blog description for the home or front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
echo " | $site_description";
}
}
?></title>
<meta name="keywords" content="<?php echo
get_field('meta_keywords','options'); ?>" />
<meta name="copyright" content="Copyright ©<?php echo date('Y'); ?> <?
php bloginfo('name'); ?> - <?php bloginfo('description'); ?>">
<meta name="googlebot" content="index, follow">
<meta name="Revisit-after" content="3 Days">
<meta name="Rating" content="General">
<meta name="title" content= "<?php bloginfo('name'); ?>" />
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?
>/css/normalize.css">
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?
>/css/bootstrap.css">
<link href="<?php echo get_template_directory_uri(); ?>/favicon.ico"
rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<?php if ( is_singular() ) wp_enqueue_script('comment-reply'); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page-wrap">
<div class="header-nav">
<div id="main-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid nav_container">
<div id="ppts_logo" class="navbar-brand">
<a href="<?php echo get_bloginfo('url');?>"><img src="<?php
the_field('logo','options');?>"></a>
</div>
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target=".navbar-collapse">
<span class="group-icon-bar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</span>
</button>
</div>
<div class="collapse navbar-collapse">
<?php wp_nav_menu( array(
'menu' => 'left',
'theme_location' => 'left',
'depth' => 2,
'menu_class' => 'nav navbar-nav',
'fallback_cb' =>
'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker())
); ?>
<?php wp_nav_menu( array(
'menu' => 'right',
'theme_location' => 'right',
'depth' => 2,
'menu_class' => 'nav navbar-nav navbar-right',
'fallback_cb' =>
'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker())
); ?>
</div>
</div>
</div>
</div>