Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 自定义文章类型单页显示完全空白_Php_Wordpress - Fatal编程技术网

Php 自定义文章类型单页显示完全空白

Php 自定义文章类型单页显示完全空白,php,wordpress,Php,Wordpress,你好,我的wordpress主题的帖子类型listingssingle post显示一个空白页面。但是在另外3个主机上它可以工作。 一个完全空白的页面标题甚至不显示 我试图通过以下方式解决问题: WP_调试设置为true 删除层次结构 设置错误\u报告(-1) 停用所有插件 重新设定主题 但所有这些步骤都消失了 链接 我的自定义邮件类型注册表: public function register_restaurant_listing() { register_post_type('list

你好,我的wordpress主题的帖子类型
listings
single post显示一个空白页面。但是在另外3个主机上它可以工作。 一个完全空白的页面标题甚至不显示

我试图通过以下方式解决问题:

  • WP_调试设置为true
  • 删除层次结构
  • 设置错误\u报告(-1)
  • 停用所有插件
  • 重新设定主题
  • 但所有这些步骤都消失了

    链接

    我的自定义邮件类型注册表:

    public function register_restaurant_listing()
    {
        register_post_type('listings', array(
            'labels' => array(
                'name' => __('Restaurant listing', 'thefoody') ,
                'singular_name' => __('Restaurant listing', 'thefoody') ,
                'add_new' => __('Add New', 'thefoody') ,
                'add_new_item' => __('Add New Restaurant listing', 'thefoody') ,
                'edit' => __('Edit', 'thefoody') ,
                'edit_item' => __('Edit Restaurant listing', 'thefoody') ,
                'new_item' => __('New Restaurant listing', 'thefoody') ,
                'view' => __('View Restaurant listing', 'thefoody') ,
                'view_item' => __('View Restaurant listing', 'thefoody') ,
                'search_items' => __('Search Restaurant listings', 'thefoody') ,
                'not_found' => __('No Restaurant listings found', 'thefoody') ,
                'not_found_in_trash' => __('No Restaurant listings found in Trash', 'thefoody') ,
                'parent' => __('Parent Restaurant listing', 'thefoody') ,
            ) ,
            'public' => true,
            'show_ui' => true,
            'exclude_from_search' => true,
            'hierarchical' => true,
            'supports' => array(
                'title',
                'editor',
                'thumbnail'
            ) ,
            'query_var' => true,
            'menu_icon' => 'dashicons-megaphone'
        ));
    }
    

    在此页面上,打开错误报告:
    ini\u集('display\u errors',1);错误报告(E_全部)应该告诉您出了什么问题。如果“显示错误”处于关闭状态,我认为
    错误报告()
    将不起作用。@Rasclatt尝试过但不起作用。或显示任何错误:(