[ad_1]
Hi guys,
I’ve already created my own custom post type by coding and after that, I’ve installed GeoDirectory. But when I looked to the “GeoDirectory->Settings->Post Types”, I didn’t see my CPT. So my question is how to add my CPT into the GeoDirectory Post Type ? Thanks for your answer.
Below is the code creating my Post Type
add_filter('init',function(){
register_post_type('music',[
'labels' => [
'name' => 'Musics',
'singular_name' => 'Musics',
'add_new' => 'Add new',
'add_new_item' => 'Add new',
'view_item' => 'Music Lists',
'edit_item' => 'Edit music',
'new_item' => 'New music',
'all_items' => 'All the musics',
'search_items' => 'Search',
'menu_name' => 'Music',
],
'public' => true,
'hierarchical' => false,
'publicly_queryable' => false,
'menu_icon' => 'dashicons-media-audio',
'supports' => ['title', 'editor', 'thumbnail','custom-fields'],
'taxonomies' => ['categorie-music'],
'show_in_rest' => false,
]);
});
