Created
August 7, 2013 12:23
-
-
Save chipbennett/6173596 to your computer and use it in GitHub Desktop.
Reusable add_meta_box()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add the Meta Box | |
function add_custom_meta_box() { | |
// Post | |
add_meta_box( | |
'cram_post_meta_box', // $id | |
'Additional information for the post', // $title | |
'add_custom_meta_box_callback', // $callback | |
'post', // $page | |
'normal', // $context | |
'high' // $priority | |
); | |
// Page | |
add_meta_box( | |
'cram_post_meta_box', // $id | |
'Additional information for the post', // $title | |
'add_custom_meta_box_callback', // $callback | |
'page', // $page | |
'normal', // $context | |
'high' // $priority | |
); | |
} | |
add_action('add_meta_boxes', 'add_custom_meta_box'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should add the textdomain tags for the title, no?
__( 'Your title', 'Your textdomain' ), // $title