Second function register_type_ not showing in admin ui
-
I’ve had a script running for some time now. works fine. It makes a custom post type and shows it in the admin ui.
I want to copy this functionality under a new name here is how i copied it:
function register_type_photoprojects() { register_post_type('wp_photoproject', array( 'public' => TRUE, 'has_archive' => TRUE, 'menu_position' => 21, 'labels' => array( 'name' => __('Photo projects'), 'singular_name' => __('Photo project'), 'add_new' => __('Add new'), 'add_new_item' => __('Add new photo project'), 'edit' => __('Edit'), 'edit_item' => __('Edit photo project'), 'new_item' => __('New photo project'), 'view' => __('View'), 'view_item' => __('View photo project'), 'search_items' => __('Search photo projects'), 'not_found' => __('No projects found'), 'not_found_in_trash' => __ ('No projects found in trash') ), 'rewrite' => false, 'supports' => array('title','editor','thumbnail','page-attributes') )); } function register_type_commissionedprojects() { register_post_type('wp_commissionedproject', array( 'public' => TRUE, 'has_archive' => TRUE, 'menu_position' => 22, 'labels' => array( 'name' => __('Commissioned projects'), 'singular_name' => __('Commissioned project'), 'add_new' => __('Add new'), 'add_new_item' => __('Add new commissioned project'), 'edit' => __('Edit'), 'edit_item' => __('Edit commissioned project'), 'new_item' => __('New commissioned project'), 'view' => __('View'), 'view_item' => __('View commissioned project'), 'search_items' => __('Search commissioned projects'), 'not_found' => __('No projects found'), 'not_found_in_trash' => __ ('No projects found in trash') ), 'rewrite' => false, 'supports' => array('title','editor','thumbnail','page-attributes') )); } function my_setup_theme() { add_theme_support('post-thumbnails', array('wp_photoproject','post', 'wp_commissionedproject')); add_image_size('photo-big', 960, 740); add_image_size('photo-thumb', 0, 250); register_type_photoprojects(); register_type_commissionedprojects(); register_scripts(); }The first piece is the working one, the copy called commissionedprojects is not workinging but is exactly the same.
The topic ‘Second function register_type_ not showing in admin ui’ is closed to new replies.