admin管理员组文章数量:1289878
I have this code in my functions.php, don't know what to do next??
function our_artist(){
$labels = array(
'name' => 'Artists',
'singular_name' => 'Artist',
'add_new' => 'Add Item',
'all_item' => 'All Item',
'add_new_item' => 'Add Item',
'edit_item' => 'Edit Item',
'new_iten' => 'New Item',
'view_item' => 'View Item',
'search_item' => 'Search',
'not_found' => 'No Items found',
'not_found_in_trash' => 'No Items found in trash',
'parent_item_colon' => 'Parent Item'
);
$args = array(
'labels' => $labels,
'public' => true,
'has_archive' => true,
'publicly_queryable' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'supports' => array(
'title',
'editor',
'revisions',
'thumbnail',
'excerpt'
),
'menu_position' => 5,
'exclude_from_search' => false
);
register_post_type('artists',$args);
flush_rewrite_rules();
}
add_action('init', 'our_artist');
function arc_create_artist_cat_tax_rewrite() {
register_taxonomy('artist_cat',array('artists'), array(
'hierarchical' => true,
'labels' => 'Artist Category',
'show_ui' => true,
'show_in_rest' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'artist_cat' ),
));
}
add_action( 'init', 'arc_create_artist_cat_tax_rewrite', 0 );
本文标签: phpopen custom post type in popup window instead of page
版权声明:本文标题:php - open custom post type in popup window instead of page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741403818a2376824.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论