自定义帖子类型单页显示完整空白

时间:2017-03-01 02:19:25

标签: php wordpress

你好我的wordpress主题的帖子类型listings单个帖子显示一个空白页面。但另外3个托管它的工作原理。 一个完整的空白偶数页面标题没有显示。

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

  1. WP_DEBUG设置为true
  2. 删除分层
  3. 设置error_reporting(-1)
  4. 停用所有插件
  5. 新设置主题
  6. 但所有这些步骤都已经过去了。

    链接http://www.thefeastbox.in/listings/thai/

    我的自定义帖子类型注册:

    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'
        ));
    }
    

0 个答案:

没有答案
相关问题