The add_meta_boxes hooks load in edit-form-advanced.php. Your custom plugin page “test” does not use that file. You need to hook into the “plugin admin page hooks” instead.
Secondly, the third parameter of add_meta_box is just the CPT slug, not the page slug you have.
Here is what you need to change:
add_action("load-my-cpt_page_my-cpt-slug", "my_add_metaboxes");
function my_add_metaboxes()
{
add_meta_box("my-cpt-metabox", "My CPT Metabox", "display_my_metabox", "my-cpt", "normal", "core");
}
Related Posts:
- Do I need a nonce field for every meta box I add to my custom post type admin?
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- How to force one column layout on custom post type edit page?
- Custom Post Type – Taxonomy Dropdown Menu?
- How to add meta box to backend menu page
- How to add multiple images to a custom post type single post?
- How to add multiple images to custom post type?
- Listing Pages With Checkboxes In a Metabox (and saving them)
- How do I remove all the metaboxes for a custom post type?
- How To Set Custom Post Type Title Without Supports
- Creating a Custom Post Types dropdown in a Meta Box
- Get all posts from custom post type and insert in select input as metabox
- Add pre-existing meta box to new custom post type
- Dynamic page.php template for custom post types
- WordPress metabox file upload in custom post [duplicate]
- Use Custom Post Type as Custom Field
- Saving multiple Metabox contents
- Display metabox conditionally
- Possible to add meta box to edit.php pages?
- How can I include meta box content when searching?
- Embed ‘New Post’ Form Inside ‘New Post’ Form
- How to stop wordpress from mangling HTML in a metabox textarea
- Relate two custom post type using meta box
- Hiding Metabox from Screen Options Pull Down
- How to: add option to add more checkboxes on custom post type
- how to set default value for checkbox in wordpress
- How can I display my custom metaboxes on a custom post template?
- Custom Post Type with metaboxes (no content) only?
- How can I show/add/save custom metaboxes as an Array of values?
- Unable to show meta box data in frontend
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- window.send_to_editor and jQuery .attr() conflicts with multiple custom upload image meta boxes
- Save an array from drop-down in custom meta box
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Custom meta box not saving
- Push metadata in array
- WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types
- Make metabox of custom post type fully autosave- and bulk-/quick-edit compatible
- Custom Post Type uses Custom Tags in add_filter?
- Is it possible to create relational metabox values in a custom post?
- Changing custom type name hides the posts
- Getting Custom Post Type Meta on Publish
- Show Custom Post Type meta boxes only on Page Edit
- Adding Page Templates to post but it ignored it
- Parent Page and Breadcrumb URL’s for Custom Post Types Not Working
- Fixed values for same post translations
- Checking if $_FILE isset for an array of file upload metaboxes
- Ordering values entered in Custom Taxonomies
- Permalinks: custom structure for taxonomy – tags?
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- Sizing textarea field in custom metabox
- Custom Post Meta from custom metaboxes is randomly being deleted
- Custom post-type metabox position
- How to add editable/dynamic values to dropdown of a Custom Post Type Meta Box
- wysiwyg editor don´t export paragraph
- How can I set a meta value that will then affect other post meta values?
- Inefficient Query Confusion
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- link featured image to external link
- Get custom term meta problem on single post type
- Is it possible to sort metabox teaxtarea values?
- wp_editor for custom post type doesn’t save value
- Showing a meta box in a custom post type on a page
- Having Issue on Getting Metabox Checkbox Value
- Multiple wp_editor instances in custom post type using Ajax
- CMB select with data from CPT
- Updating post content and custom fields in edit post screen
- Add a class to post_class if more than one post shares same meta_value_num
- Function to return values from metabox
- Add a meta field to the list of results for a custom post type
- List of all posts in one custom post type in the edit screen of another
- Create a custom post type based on ‘Post’
- How do you make relational post types in WordPress? [duplicate]
- Placing Admin Post Metaboxes in Tabs
- Wp Meta Query does not work while simple Query Works
- How to Grab Anime info using Jikan API and fill the value in Metabox
- create a “add icon” field in taxonomies page
- Problem with multi checkboxes value in metabox?
- Getting data from dynamically allocated metaboxes within a custom post
- Get meta values from parent post and save in child post
- Using meta boxes as the title of a custom post type
- check_admin_referer not working in custom meta box for custom post type
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Custom meta box in editor of custom post type not working
- Meta box not saving
- CPT and metabox: create multi checkbox by using array?
- How to make post page unique and show it on home page?
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Add different meta box based on taxonomy
- Custom sortable pages on custom post type
- Toggle a metabox based on a selection
- Add multiple custom meta boxes to different custom post types
- Custom post type Featured Image popup not working
- Need to build custom metabox select prev posts by category
- How to bring custom meta boxes to custom post types?
- Problems with a custom meta_box
- Customized featured image doesn’t refresh in post admin metabox after upload/insert
- Saving custom metabox data with a twist
- Canot save post if any meta box was empty
- custom post type with metabox custom fields