每当我尝试通过WPBakery Page Builder从wp admin编辑任何页面时,header.php代码都会被自动删除。
插件列表: 1.高级自定义字段 2.Custom Post Type Maker 3,禁用古腾堡 4,重力形式 5.重力形式+条纹 6.Gravity Forms AWeber附加组件 7,选项树 8,证明书滑块 9.WPBakery页面构建器
我检查error_log.php文件上没有任何内容。当WP_DEBUG为true时,在wp-admin上出现错误而不是forntendend。错误:“不赞成使用:函数create_function()在/home/.../中已弃用第69行的public_html / wp_wallstreet / wp-content / plugins / option-tree-master / includes / ot-functions-admin.php ”。 我将php内存限制提高到512M。
define('WP_MEMORY_LIMIT', '512M');
我的header.php文件代码
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<!-------------man_link_start----------------->
<link href="<?php echo get_template_directory_uri(); ?>/assets/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo get_template_directory_uri(); ?>/assets/css/responsiv.css" rel="stylesheet" type="text/css" />
<link href="<?php echo get_template_directory_uri(); ?>/assets/css/hover.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-------------responsiv_menu_link_start----------------->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/styles.css?v=1.0" />
<!-------------slider_link_start----------------->
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/assets/engine1/style.css" />
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/assets/engine1/jquery.js"></script>
<!-- End WOWSlider.com HEAD section -->
<!-----------------------------carousel_start-------------------------------->
<link href="<?php echo get_template_directory_uri(); ?>/assets/css/carousel_css.css" rel="stylesheet" type="text/css" />
<!-------------smooth_scroll_link_start----------------->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
</script>
<?php wp_head(); ?>
</head>
<body>
<!-------------header_start----------------->
<div class="header_wreper " >
<div class="header_container">
<a href="<?php echo site_url();?>"><div class="logo"><img src="<?php echo get_template_directory_uri(); ?>/assets/images/logo.png" /></div></a>
<div class="responsiv_menu">
<div class="menu-container">
<div class="crbnMenu">
<div class="link-stack">
<a id="nav-toggle" class="nav-toggle">
<span></span>
</a>
</div>
<ul class="menu">
<?php wp_nav_menu(array(
'menu' => 'Header Menu',
'items_wrap'=>'%3$s',
'container' => false,
'walker' => new BootstrapNavMenuWalker()
)); ?>
</ul>
</div>
</div>
<script src="<?php echo get_template_directory_uri(); ?>/assets/js/crbnMenu.js"></script>
<script>
if ($(window)) {
$(function () {
$('.menu').crbnMenu({
hideActive: true
});
});
}
</script>
</div><!--responsiv_menu_end-->
<div class="destop_menu">
<ul>
<?php wp_nav_menu(array(
'menu' => 'Header Menu',
'items_wrap'=>'%3$s',
'container' => false,
'walker' => new BootstrapNavMenuWalker()
)); ?>
<a href="#" class="about_us_read_more" style="margin-top: 6px; padding: 5px 0px 5px 0px;
height: auto;
width: 90px;">Free Book</a>
</ul>
</div>
</div><!--header_container_end-->
</div><!--header_wreper_end-->