Created
August 21, 2011 20:32
-
-
Save Tmeister/1161119 to your computer and use it in GitHub Desktop.
WordPress MetaBox
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
<?php | |
add_action( 'add_meta_boxes', 'add_custom_box', 1); | |
function add_custom_box() | |
{ | |
add_meta_box( | |
'id_box', | |
"Title Box", | |
'inner_custom_box'), | |
'post', | |
'side' | |
); | |
} | |
function inner_custom_box( $post ) | |
{ | |
wp_nonce_field( plugin_basename( __FILE__ ), 'plugin_noncename' ); | |
?> | |
<p>Field</p> | |
<input type="text" name="custom-data" /> | |
<? | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment