代码如下:
什么需要添加到代码启用饲料为这个自定义职位?
这个饲料链接不为我工作与此代码的自定义职位:(
https://website.io/feed/?page_type=reviewshttps://website.io/reviews/feed/
function nd_dosth_register_custom_post_types(){
//Register Reviews Post Type
register_post_type( 'dosth_reviews',
array(
'labels' => array(
'name' => __( 'Reviews', 'nd_dosth' ),
'singular_name' => __( 'Review', 'nd_dosth' ),
'add_new' => __( 'Add Review', 'nd_dosth' ),
'add_new_item' => __( 'Add New Review', 'nd_dosth' ),
'edit_item' => __( 'Edit Review', 'nd_dosth' ),
'all_items' => __( 'All Reviews', 'nd_dosth' ),
'not_found' => __( 'No Reviews Found', 'nd_dosth' ),
),
'menu_icon' => 'dashicons-format-quote',
'public' => true,
'exclude_from_search' => true,
'has_archive' => true,
'hierarchical' => false,
'show_in_rest' => true,
'rewrite' => array( 'slug' => 'reviews' ),
'supports' => array( 'title', 'editor', 'author', 'custom-fields', 'thumbnail', 'excerpt', 'revisions', 'page-attributes' ),
//'taxonomies' => array( 'category', 'post_tag' )
'menu_position' => 20,
'has_archive' => true,
)
);
}
add_action('init', 'nd_dosth_register_custom_post_types');
字符串
1条答案
按热度按时间sg2wtvxw1#
尝试添加以下代码:
字符串