$portfoliourl_1_metabox = array( 'id' => 'portfoliourl', 'title' => 'Portfolio URL', 'page' => array('portfolio'), 'context' => 'side', 'priority' => 'low', 'fields' => array( array( 'name' => 'Portfolio Meta URL', 'desc' => 'Enter a URL you want to use somewhere in the portfolio for a link', 'id' => 'nick_portfolio_url', 'class' => 'nick_portfolio_url', 'type' => 'text', 'rich_editor' => 0, 'max' => 0 ), ) ); add_action('admin_menu', 'nick_add_portfoliourl_1_meta_box'); function nick_add_portfoliourl_1_meta_box() { global $portfoliourl_1_metabox; foreach($portfoliourl_1_metabox['page'] as $page) { add_meta_box($portfoliourl_1_metabox['id'], $portfoliourl_1_metabox['title'], 'nick_show_portfoliourl_1_box', $page, 'side', 'low', $portfoliourl_1_metabox); } } // function to show meta boxes function nick_show_portfoliourl_1_box() { global $post; global $portfoliourl_1_metabox; global $nick_prefix; global $wp_version; // Use nonce for verification echo ''; echo '
', ' | ';
switch ($field['type']) {
case 'text':
echo ' ', '', stripslashes($field['desc']); break; } echo ' | ', ' |
---|