So to answear my own question after much googeling:
In the args array I commented out the option for show_in_menu, so that custom post type creates the menu itself. Then I didn’t add the admin menu, but just the submenu (the hook still remains).
add_action('admin_menu','bsp_plugin_menu');
And the first parameter is the one that shows it in the menu and it is a name of the custom post type:
add_submenu_page(**'edit.php?post_type=badge'**, 'Add new students', 'Add new students', 'manage_options','add-new-students','bsp_students_add');
And now it shows in the menu with all the taxonomies and custom post.
Related Posts:
- How to Add Custom Taxonomy To Woocommerce Plugin
- How to completely disable a taxonomy archive on the frontend?
- register_taxonomy with multiple object type and update_count_callback
- Custom Taxonomy and tax_query Issue?
- How to List Thumbnails based on Custom Categories
- Custom Taxonomy Not Showing in Menu
- Set object terms not working on plugin activation
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- get_object_taxonomies() returns empty array for custom post type
- Adding a custom post type taxonomy template in plugin
- What is the best practice for displaying my plugin content in themes?
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Plugin fatal error
- Custom post type’s extra fields – how to handle?
- Main query not querying any posts in custom taxonomy template
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- Dynamically insert code to custom post type loop
- Show current custom taxonomy
- Show category and tag link as a submenu under custom post type submenu
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Most viewed post of custom post type
- Writing a custom Glossary plugin
- Custom post type page with parameter
- Custom post type category link redirecting to 404 page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- How to show Custom Post Types under Taxonomy in a new WordPress page template?
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- Error 404 change permalink term custom term taxonomy
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Changing CPT permalink
- I have a random letter appearing before my content. Where to start looking for the cause?
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Insert custom taxonomy into category query
- % encoded URL giving 404 error in WordPress
- Which File Populating CPTs in Slug URL
- Not Able to List CPT Based on Taxonomy Term
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Associate custom categories to different user IDs
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Render custom taxonomy query as single template
- Custom Taxonomy Showing in WP Menu
- Get term_id for each instance of custom taxonomy
- How to internationalize the sub menu name “categories” in Custom post type?
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Custom Post Type urls not working
- How to filter custom post data with AJAX?
- Make term slugs of custom taxonomy available in WP REST API for custom post type?
- Display all posts in a custom post type, grouped by a custom taxonomy
- Ordering Posts List By Taxonomy Terms?
- post count is wrong when using same taxonomy for 2 different CPT
- Issues when rewrite rules collide?
- Determine which template-{slug}.php is being loaded
- Archive page for taxonomy of custom post type
- CPT tax slug conflict with post type slug
- Custom post type archive with dynamic taxonomy filtering – is it possible
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Exclude current post when getting related post on custom post type and taxonomy
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- How to specify URLS for custom posts & taxonomies
- Taxonomy.php Not Showing Posts
- Plugin translation not working apart from name and description
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- How to customize a permalink (URL) structure?
- Custom-Posttype & Custom Taxonomy WP_Query
- Custom post type url with category
- Taxonomies don’t show up on in the dashboard page for a custom post type in wordpress 5.22
- Set a CPT slug as a base name for all the taxonomies
- Custom taxonomy rewrite with query var returns %2F in URL
- Remove slug in URL custom post type
- Taxonomies relations
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- Template files for Custom Post Type and Taxonomy
- Custom Post type & Taxonomy 404
- how to set a WP Plugin’s url
- WordPress menu with custom taxonomy
- attach CPT data to a taxonomy
- ajax response not recieving
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- Creating a non-hierarchical Taxonomy that behaves like categories
- How to get xml file for a single post type?
- How to Control CSS Class Visiblity From WordPress Admin Panel based on Tax Terms
- Problem retrieving informations and displaying desired structure with custom post type and taxonomy
- Archive page of CPT’s custom Taxonomy
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Custom post category name showing empty
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- How to show related posts of category on post within custom posttype
- Not saving custom taxonomy while using ajax
- Post Tags not working for Custom Post type
- Show a custom post title in another custom post type in Meta box
- Restrict Custom Post Type to One Item
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- Custom URL for Custom Post Type & Custom Taxonomy Term
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Custom post type taxonomy template and URL confusion
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- WordPress Custom Post Type and sort by Tags
- How to consume external API from WordPress post editor and display the response data in the custom field?