Php Wordpress-在编辑器中尝试更新页面和/或文件时出现白色死屏

Php Wordpress-在编辑器中尝试更新页面和/或文件时出现白色死屏,php,wordpress,html,Php,Wordpress,Html,我在wordpress上加载一个前端站点,使用HTML5 blank的子主题,我得到了白屏处理——奇怪的是(或者不是?)我只是在点击页面上的更新按钮或者在外观>编辑器中点击“更新文件”时才得到它 我相信我已经完成了所有的标准检查——插件、主题(如果是主题,我为什么还要访问它?)。我看过phpmyadmin,但在那里什么也看不到 这就是我在functions.php- <?php function my_theme_enqueue_styles() { $parent_style

我在wordpress上加载一个前端站点,使用HTML5 blank的子主题,我得到了白屏处理——奇怪的是(或者不是?)我只是在点击页面上的更新按钮或者在外观>编辑器中点击“更新文件”时才得到它

我相信我已经完成了所有的标准检查——插件、主题(如果是主题,我为什么还要访问它?)。我看过phpmyadmin,但在那里什么也看不到

这就是我在
functions.php
-

<?php
function my_theme_enqueue_styles() {

    $parent_style = 'html5blank-style'; // This is 'html5blank-style' for the HTML 5 Blank theme.

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
        wp_get_theme()->get('Version')
    );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>


我刚刚开始网站建设-我只有Akismet和Hello Dolly在插件面板中,它们都没有被激活。有人能在functions.php中发现我看不到的东西吗?或者我还需要检查其他东西吗?

在进行了更深入的搜索后,我找到了这个-并接受了手头的建议,将此代码添加到我的
wp config.php
文件中-

error_reporting(E_ALL); ini_set('display_errors', 1);

define( 'WP_DEBUG', true);

这段代码指向空白处的错误,在我的例子中,它与我的
functions.php
文件中的空白太多有关。这帮助我解决了这个问题。现在一切正常

如果您有一个带有style.css和functions.php的简单子主题,并且如果您在自定义过程中更新帖子或尝试更改/加载其他主题,那么您必须在子主题目录中打开functions.php。删除所有空白和所有行。在那之后它会起作用的

带有白色屏幕的子主题错误:

<?php 

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

function theme_enqueue_styles() 
{
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') );        //Comment with to much white space
}

?>

没有错误的新子主题

<?php 
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() 
{
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') );//Comment updated without space
}
?>

顺便说一句:我有第二行,因为第一行我不能覆盖原来的style.css。第二行帮助你做到这一点,而不需要其他任何东西