在我的标题标签之间添加了我的facebook像素代码。php主题文件,现在我的网站都搞砸了,不能正常显示。我试着删除脸书的像素代码并保存下来,但网站还是一团糟。我肯定我只删除了像素代码,但我担心我可能也删除了一小部分代码。
我想尝试还原标题的早期版本。Worpress上的php文件。
对于如何解决这一问题,也有其他想法。谢谢
这是标题。php代码-我正在尝试在标题标记之间插入Facebook像素代码。在标题标记后面还有一段Google Tag Manager代码,我没有包括这段代码,因为复制并粘贴到下面的代码时,它看起来不正确:
<!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>