我对WordPress posts\\u type有一个问题,通常位于每个帖子页面底部的自定义字段丢失了。
在WordPress贴子页面的顶部,你会看到一个灰色的小框,上面写着。。屏幕选项。单击此选项,它将为您提供一个下拉菜单。
我删除了自定义字段,它出现了,但在我发布页面后,它又消失了。。
我禁用了所有插件,但没有成功。。。同样的。。。
如何注册自定义帖子类型。。。
/* ------------ Post Type Stiri -----------*/
register_post_type(\'stiri\', array( \'label\' => \'Stiri\',\'description\' => \'\',\'public\' => true,\'show_ui\' => true,\'show_in_menu\' => true,\'capability_type\' => \'post\',\'hierarchical\' => true,
\'rewrite\' => array(\'slug\' => \'\'),
\'query_var\' => true,\'has_archive\' => true,
\'menu_position\' => 5,\'supports\' => array(\'title\',\'editor\',\'custom-fields\',\'category\', \'post_tag\',),
\'labels\' => array (
\'name\' => \'Stiri\',
\'singular_name\' => \'Stire\',
\'menu_name\' => \'Stiri\',
\'add_new\' => \'Add Stire\',
\'add_new_item\' => \'Add New Stire\',
\'edit\' => \'Edit\',
\'edit_item\' => \'Edit Stire\',
\'new_item\' => \'New Stire\',
\'view\' => \'View Stire\',
\'view_item\' => \'View Stire\',
\'search_items\' => \'Search Stiri\',
\'not_found\' => \'No Stiri Found\',
\'not_found_in_trash\' => \'No Stiri Found in Trash\',
\'parent\' => \'Parent Stire\',
),) );
register_taxonomy("stire","stiri", array("hierarchical" => true, "label" => "Cat Stiri", \'show_ui\' => true, \'query_var\' => true, "singular_label" => "stire", "rewrite" => true , \'with_front\' => true));
如果没有解决方案,请在此处发布