When ordering or closing metaboxes, those actions require nonces, add the following to your code and see if that resolves the problem.
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
Additional:
You should add metaboxes to your page using add_meta_box
and output them using do_meta_boxes
passing in the hook for your plugin page as the first arg. This should at least ensure you have registered and output them in the same way WordPress does, and providing you’ve also output the appropriate nonces, should work.
If something still isn’t working, view source on your problem page(s) and verify the JS files are being output in the correct order(easier still, compare JS inclusions in your page with a core WordPress page that uses metaboxes, make sure your JS includes(enqueues) appear in the same order).
Related Posts:
- Rearranging Dashboard meta boxes with use of plugin/functions.php
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Add screen options to custom admin pages
- Get List of Registered Meta Boxes and Removing Them
- How to add tab which is visible only in admin side of product in woocommerce? [closed]
- Change default admin page for specific role(s)
- Save metabox with multiple checkbox array
- How to Use WordPress Color Picker API in Custom Post Type Metabox
- How to create Image gallery Metabox in wordpress [closed]
- Conflicting save_post functions when passing the post id and saving custom meta boxes for different post types
- How to add meta boxes to the ‘Add new post’ screen?
- Plugin admin page meta_box toggle and order state not saving
- Metabox Not Showing on Custom Post Type But On Pages and Post
- Best choice of options/settings framework for plugin/theme development
- How to create a Tools menu on the Network Admin dashboard from a plugin
- Admin auto-refresh is interfering with Firebug — how to prevent it?
- Show add_meta_box by selecting a specific category
- how do you prevent showing a particular category on the admin dashboard for specific user roles?
- update post meta for checkbox in the admin when inserted in the front-end
- Custom Taxonomy to dropdown box on adminside wordpress
- Example Dashboard Widget, Cancel not working
- Create & Save multiple Meta-boxes
- Add a Save Button to Custom Meta Box [duplicate]
- “dashboard”-named PHP file doesn’t get included
- Getting List of all registered Dashboard Widgets
- what is the difference between these phares?
- How to get Metabox custom field to show checked if value is updated using post meta query?
- How do I update a field of a meta box?
- Input value from metabox is not found in $_POST after post save
- Including comments meta box on a plugin page
- Avoid updating post when sending POST or GET request to post.php
- How to add a widget to the post editing view?
- Adding admin menus to wordpress
- Automating the process of shortcode generation in a plugin – how is it done?
- Meta box on options page save form problem
- Moving/dragging a metabox removes TinyMCE’s content
- Store custom meta box data as serialized array
- WP nonce field checkbox prints checked=’checked’ outside input field
- How to add custom post widgets as tags into wordpress
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- Adjust query on single
- Can I attach a plugin via my add_filter callback contents?
- Metabox is not displaying
- Catch metabox values in Plugin
- want to show CMB2 metabox on woocommerce product data tab
- Why is $_POST empty when saving custom Meta Box?
- Custom Icon for Plugin
- WP_List_Table Inside Metabox With Bulk Actions Not Working on Submit
- How to show the posts listing on dashboard or custom page in admin panel?
- Save meta box data from selected dropdown list in bbpress reply form
- Metabox types list
- Quick Draft widget (dashboard.php) using custom post_type
- WordPress Filesystem create CSS-File – get Shortcode ID for Name
- How to save multiple values in custom post type from front end to back end
- add_meta_box does not display meta box in Admin
- Add WordPress Meta Box saved form input to WordPress RSS feed [duplicate]
- set a custom post type to a taxonomy term programmatically in metabox
- Dynamically getting tags in post edit screen
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- How to show metabox just in post.php in admin?
- Plugin dev: How to multiply instances of a plugin in the same metabox?
- save_post not called in plugin / custom field still saving overwriting metaboxes
- Get fields of a widget
- Display Data’s metabox in page
- Show Metabox Images in slideshow instead of static
- Tracing dashboard publish settings from input form in WordPress
- Create wordpress dashboard metabox which spans all columns
- How to set/change another post author by custom fields or something else?
- How can I add a custom button to the post editor?
- How do I display and edit other posts within the ‘Edit Post’ area of Wp-Admin Dashboard
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?
- Saving metabox updates causing fatal error
- Best practices for using the transients API
- function triggered by “manage_users_custom_column” filter not working
- How does uninstalling WordPress plugins work?
- Second select list values are not saved after clicking update
- Will cron job run if page loaded is being served from cache?
- Sharing common functionality (functions, template parts) between plugins and themes?
- What is the proper way to include Bootstrap when executing a shortcode
- How can I turn a custom wordpress page into a product page?
- Auto-Populate Image After Media Upload
- WP Multisite login not working on one subsite. Possibly cookies/ history issue?
- dbDelta not installing database
- Cannot get jQuery UI to enqueue in my plugin!
- Catching Form Submission in WordPress Admin Panel
- How to replace settings in WordPress plugin from a theme
- Save temporary registration data
- How to validate inputs with filter in register_setting callback
- A question on init and activation hooks
- Always hide a page from the menu
- Add custom html classes to gutenberg wrapper
- Update database record in plugin
- Can I use a hook other than ‘init’ to handle form submissions?
- Managing Custom Designed Content
- Stop theme displaying comments
- Do a summary based on sections in a post
- Plugin as custom page
- Plugin capabilities
- Deactivate plugin on registration
- How to filter manage categories listing