I've added this code to my magazine.php file into the plugin, but when it is activated, the CPT does not appear in the dashboard menu. Do you figure out why? it is a really minimalistic CPT, i do not understand why it does not work...
add_action('init', 'mc_setup_post_type');
function mc_activation(){
// trigger the wp function that registers the custom post type
mc_setup_post_type();
//clear the permalinks after the post type has been registered
flush_rewrite_rules();
}
function mc_setup_post_type(){
//register the "magazine" custom post type
register_post_type('magazine', array(
'labels' => array(
'name' => 'magazine'),
'public' => 'true'));
}
magazine.php
included somewhere or it's an orphan file? Please make clear what your plugin is.