当我把它放在functions.php中时,为什么这段代码使我的屏幕在admin中变成空白? [英] Why does this code make my screen go blank in admin when I put it in functions.php?
查看:19
php
wordpress
wordpress-theming
本文介绍了当我把它放在functions.php中时,为什么这段代码使我的屏幕在admin中变成空白?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在管理中发布内容或更改任何设置时,屏幕变为空白,我发现这是由于我的 functions.php
文件中的此代码造成的.有什么问题吗?
'页脚','id' =>'页脚','before_widget' =>'','after_widget' =>'','before_title' =>'','after_title' =>'</div>'));register_sidebar(数组('名称'=>'右侧边栏','id' =>'右侧栏','before_widget' =>'','after_widget' =>'</div>','before_title' =>'','after_title' =>'</div>'));register_sidebar(数组('名称'=>'广告','id' =>'广告','before_widget' =>'','after_widget' =>'','before_title' =>'','after_title' =>'</div>'));}?>对这个相当新,所以细节会很好!
解决方案 functions.php 文件中不需要的间距导致了这个问题.
When publishing content or changing any settings in the admin, the screen goes blank, I found that it's due to this code in my functions.php
file. Is there something wrong with it?
<?php
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name'=> 'Footer',
'id' => 'footer',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<div class="title">',
'after_title' => '</div>'
));
register_sidebar(array(
'name'=> 'Right-Sidebar',
'id' => 'rightsidebar',
'before_widget' => '<div class="white-bar">',
'after_widget' => '</div>',
'before_title' => '<div class="title">',
'after_title' => '</div>'
));
register_sidebar(array(
'name'=> 'Ads',
'id' => 'ads',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<div class="title">',
'after_title' => '</div>'
));
}
?>
Fairly new to this, so details would be excellent!
解决方案 Un-needed spacing in the functions.php file was causing this.
这篇关于当我把它放在functions.php中时,为什么这段代码使我的屏幕在admin中变成空白?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
相关文章
-
我应该把这段代码放在Laravel的什么地方?;
-
带有wp_redirect($ url)的functions.php;出口();使WordPress的网站空白;
-
我的共享主机上所有 wordpress 网站的 functions.php 中的 PHP 代码;
-
在functions.php中的Wordpress var_dump;
-
functions.php vs OOP;
-
我把PHP代码放在我的文件之上,虽然路径是正确的,但是当我运行它时,它说没有找到对象;
-
WordPress的functions.php问题;
-
警告:sprintf():functions.php中的参数太少;
-
修改functions.php中的WordPress插件功能;
-
Wordpress functions.php 子主题;
-
当我把它放在onclick中但是当我尝试在页面加载时使用时它不起作用(JavaScript);
-
Wordpress:添加到functions.php的代码在更新后消失;
-
WordPress 表单操作 - functions.php 文件;
-
php - 为什么这段代码不能输出;
-
把前提变成代码?;
-
WordPress have_posts()在Functions.php中不起作用;
-
关于 if 和 else if 语句的 functions.php 中的 Wordpress PHP 问题;
-
为什么我的画布在转换为图像后变成空白?;
-
不能使用php fopen()函数在wordpress functions.php;
-
为什么把JSP放在WEB-INF中?;
-
我该怎么把它放在循环中;
-
Wordpress 3 - 通过 functions.php 从帖子中删除链接;
-
如何在wordpress functions.php文件中运行脚本;
-
将基于本地语言的 WordPress 标头代码添加到 functions.php 中;
-
为什么这段代码在结构中包含冒号?;
PHP最新文章
-
请求头字段Access-Control-Allow-Headers在预检响应中不允许Access-Control-Allow-Headers;
-
路由问题导致Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException错误;
-
什么是NCFB和NOFB模式?;
-
警告:mysqli_connect():(HY000 / 1045):访问被拒绝用户'用户名'@'localhost'(使用密码:是);
-
如何处理致命错误:cURL错误7:无法连接到xxxx端口443;
-
参数3传递给GuzzleHttp\Client :: request()必须是数组类型,给定字符串;
-
phpMyAdmin的#2054无法登录到MySQL服务器;
-
SSL错误SSL3_GET_SERVER_CERTIFICATE:证书验证失败;
-
在PHPExcel中设置字体颜色,字体和字体大小;
-
如何解决cURL错误(7):无法连接到主机?;
热门教程
登录 关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆