You need to use the add_meta_box
function
add_action( 'add_meta_boxes', 'my_custom_meta_box' ) );
function my_custom_meta_box(){
$args = array();
add_meta_box(
'my_metabox_id',
__( 'My Meta Box', 'my_textdomain' ), // Title
'my_callback_function', // Callback function that renders the content of the meta box
'post', // Admin page (or post type) to show the meta box on
'side', // Context where the box is shown on the page
'high', // Priority within that context
$args // Arguments to pass the callback function, if any
);
}
function my_callback_function( $args ){
//The markup for your meta box goes here
}
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Where should I use get_option in a plugin
- Custom options page checkbox will not save, despite working with text
- How WordPress autosave can save plugin fields?
- clean wp_options table unused rows
- How can I filter the contents of a metafield before it’s displayed in the admin?
- Security checking in meta_box save is reluctant?
- FacetWP group listings by custom field [closed]
- Custom Field Template seriously messed up in WP 3.1.1
- WordPress metaboxes – textfield suggestion automatically populated
- Change the style of h1, h2, only in post entry
- Preset custom fields
- Changing the CSS with a plugin
- save short-code in my custom plugin settings problem missed something
- How to pass multiple custom fields as shortcode’s parameters
- Echo custom admin field into a is_single()
- Manual Backup – How to save to Firefox or Chrome (instead of IE which brings up popup I can’t get rid of)
- Creating Nested custom fields
- why my wordpress dont have toolbar like, plugin, themes and other?
- Do something with thumbnail image on post publish
- Add custom field for users
- Changing the body of mail sent to new user registration
- Change post template the proper way
- How can i do custom author list?
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- How to change data format in custom meta box field [closed]
- How to fix a Wordfence scan that doesn’t finish?
- Need to add custom cart item data
- Moving FB comments at the end of page
- Customizing a blog page layout
- Minimize and Uglify WordPress Plugin Files
- .php file for woocommerce edit category? [closed]
- Advanced WordPress plugin activation detection
- Customize Menu | Styling LESS/SCSS code formats
- Plugin scheduled event not working
- shortcode – multiple instances of same parameter name in one shortcode instance
- How to create a plugin that includes all the other plugins?
- Update WP option by plugin
- How to save plugin custom settings page fields
- Hide a certain category name from Related Posts
- How to create plugin in wordpress [closed]
- how to add custom info on author page? plugin, child theme?
- Why is it important to check for isset and is_array before checking in_array in this example?
- WordPress function to add text warning on every pages [closed]
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Change Header (Logo) Based on Login
- MetaBox not saving after empty
- how to change wp-admin url using function file
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- How to reinstate previously saved option?
- Calling a save function from a “submit” button
- How (or where) do I get wordpress plugin update download link?
- Is there a way to easily manage Project options (custom-fields)
- Adding option values as an array using a multi selectable select box
- Store plugin page content in wp_options?
- How Should Custom Functions Be Called For Single Posts?
- I want to filter my products with attributes [closed]
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- same user role or copy the user role to be same as the other role
- Renaming Custom Taxonomy Values
- Action on WordPress Install
- Let author add field to metabox by pressing a button
- add_meta_box creating default form field types
- Every time I save my plugin options it erases another plugin options
- How to add an extra, independent set of custom fields?
- Should meta boxes for specific pages be save in their own plugins?
- Price comparison table based on Custom Post Type?
- Show related posts based of current ACF field name in a single page post (a loop within loop)
- How can I store data from custom fields to custom tables?
- Changing plugin options from theme functions file?
- Adding a theme option to the admin that lets me turn on/off a javascript file
- How to make a textarea accept javascript in my settings apge?
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- WordPress meta-box and checkbox-list
- How to handle a WordPress blog with articles in different languages?
- Custom meta boxes not saving
- Add a “default sorting” menu to child store pages
- How can i summerize posts or news automatically in word press site?
- display unique post per category
- How do you add a settings page to another menu?
- Want to modify a Plugin – Tweetily – Can I make it tweet a Custom Field instead of Post Title?
- Delete data from custom table when deleting a post
- Widget where it can make changes to the container
- Plugin code will not work properly inside a class [closed]
- wp_mail – using a custom field value
- Custom Fields for Page Edits
- Call javascript functions from each page
- Can’t create new CPTs when menu hidden
- Localise settings section headline
- Integrating Custom Database with WordPress
- “After file loaded” action
- Edit page header on a custom plugin
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?
- Need to add/remove group of options and display them as rows
- Multisite Plugin – Access options (wp_options) on child sites
- Parent Child Custom Fields with Advanced Custom Fields
- grab or load text on demand
- How display specific category post to specific users?
- How can I add user profile fields to my mailpress mailout