// when user is logged in add_action('wp_ajax_nopriv_my_unique_ajax_action', 'ajax_my_unique_action' ); // when user is not logged in add_action( 'wp_ajax_my_unique_ajax_action', 'ajax_my_unique_action' ); }
functionhide_add_new_custom_type() { global$submenu; // replace my_type with the name of your post type unset($submenu['edit.php?post_type=my_type'][10]); } add_action('admin_menu', 'hide_add_new_custom_type');