当您声明您的;“安排”;自定义帖子类型,请确保将“author”和“breadcrumbs”作为参数添加到;“支架”;大堆例如,它可能看起来像:
$supports = array(
\'title\',
\'author\',
\'breadcrumbs\',
\'editor\',
\'excerpt\',
\'thumbnail\',
\'comments\',
\'custom-fields\',
\'revisions\',
);
$labels = array(
\'name\' => \'Arrangements\',
\'singular_name\' => \'Arrangement\',
\'menu_name\' => \'Arrangements admin menu\'),
\'name_admin_bar\' => \'Arrangements add new on admin bar\',
\'add_new\' => \'Add New Arrangement\',
\'add_new_item\' => \'Add New Arrangement\',
\'new_item\' => \'Add New Arrangement\',
\'edit_item\' => \'Edit Arrangement\',
\'view_item\' => \'View Arrangement\',
\'all_items\' => \'All Arrangements\',
\'search_items\' => \'Search Arrangements\',
\'parent_item_colon\' => \'Parent Arrangement:\',
\'not_found\' => \'No Arrangement Found\',
\'not_found_in_trash\' => \'No Arrangements found in trash\',
\'filter_items_list\' => \'Filter Arrangements\',
\'items_list_navigation\' => \'Arrangements list navigation\',
\'items_list\' => \'Arrangements list\',
);
$args = array(
\'labels\' => $labels,
\'supports\' => $supports,
\'public\' => true,
\'capability_type\' => \'post\',
\'rewrite\' => array( \'slug\' => \'arrangements\', \'with_front\' => false ),
\'menu_position\' => 2,// or whatever
\'menu_icon\' => ( version_compare( $GLOBALS[\'wp_version\'], \'3.8\', \'>=\' ) ) ? \'dashicons-admin-generic\' : false ,// or whatever
\'has_archive\' => true,
);
register_post_type( \'arrangement\', $args );
这应该可以解决作者部分的显示问题。希望它也能解决面包屑问题。如果没有,那么正如另一位用户所建议的,Yoast面包屑可能会涉及额外的复杂性。
参考号:https://developer.wordpress.org/plugins/post-types/registering-custom-post-types/