我正在使用插件自定义帖子类型ui创建一个帖子类型,上面写着电影。一切都很好。我制作了一部电影,可在
http://localhost/wordpress/movies/test/
然而,当我继续
http://localhost/wordpress/movies/
我本来希望在所有电影列表中都能将测试视为电影,但没有显示任何内容
插件生成的代码:
register_post_type(\'movies\', array(
\'label\' => \'Movies\',
\'description\' => \'\',
\'public\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'rewrite\' => array(\'slug\' => \'\'),
\'query_var\' => true,
\'supports\' => array(
\'title\',\'editor\',\'excerpt\',\'trackbacks\',
\'custom-fields\',\'comments\',\'revisions\',\'thumbnail\',\'author\',
\'page-attributes\',),
\'taxonomies\' => array(\'category\',\'post_tag\',),
\'labels\' => array (
\'name\' => \'Movies\',
\'singular_name\' => \'Movie\',
\'menu_name\' => \'Movies\',
\'add_new\' => \'Add Movie\',
\'add_new_item\' => \'Add New Movie\',
\'edit\' => \'Edit\',
\'edit_item\' => \'Edit Movie\',
\'new_item\' => \'New Movie\',
\'view\' => \'View Movie\',
\'view_item\' => \'View Movie\',
\'search_items\' => \'Search Movies\',
\'not_found\' => \'No Movies Found\',
\'not_found_in_trash\' => \'No Movies Found in Trash\',
\'parent\' => \'Parent Movie\',
),) );