我在自定义帖子类型的管理屏幕上遇到错误。我已经搜索了很多其他答案,但在我的代码中没有发现任何可能导致它的原因。这是我的密码。任何帮助都将不胜感激。
// Register the post types and taxonomys
add_action(\'init\', \'register_post_types\');
function register_post_types(){
// Property Post Type
$labels = array(
\'name\' => __(\'Properties\'),
\'singular_name\' => __(\'Property\'),
\'add_new\' => __(\'Add New\'),
\'add_new_item\' => __(\'Add New Property\'),
\'edit_item\' => __(\'Edit Property\'),
\'new_item\' => __(\'New Property\'),
\'view_item\' => __(\'View Property\'),
\'search_items\' => __(\'Search Properties\'),
\'not_found\' => __(\'Nothing found\'),
\'not_found_in_trash\' => __(\'Nothing found in Trash\'),
\'parent_item_colon\' => \'\',
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'register_meta_box_cb\' => \'custom_meta_boxes\',
\'query_var\' => true,
\'menu_icon\' => null,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'menu_position\' => 5,
\'supports\' => array( \'title\', \'editor\', \'genesis-seo\', \'thumbnail\',\'genesis-cpt-archives-settings\' ),
\'has_archive\' => true,
);
register_post_type(\'property\' , $args);
// Property Taxonomy
$taxononmy_args = array(
\'hierarchical\' => true,
\'label\' => "Categories",
\'singular_label\' => "Category",
\'rewrite\' => true,
\'show_admin_column\' => TRUE
);
register_taxonomy("property_categories", array("property"), $taxononmy_args);
}