Force hide custom field metaboxes

How can I completely remove the custom fields and the collapse button in the Edit Post/Edit Page custom screen, but without removing the capability to add custom fields with a PHP function? 2 Answers 2 http://codex.wordpress.org/Function_Reference/remove_meta_box function remove_custom_meta_form() { remove_meta_box( ‘postcustom’, ‘post’, ‘normal’ ); remove_meta_box( ‘postcustom’, ‘page’, ‘normal’ ); } add_action( ‘admin_menu’ , ‘remove_custom_meta_form’ ); … Read more

Styling Custom Meta Boxes?

I’ve built a basic meta box and have this in my functions.php. The current code: add_action( ‘admin_print_styles-post-new.php’, ‘portfolio_admin_style’, 11 ); add_action( ‘admin_print_styles-post.php’, ‘portfolio_admin_style’, 11 ); function portfolio_admin_style() { global $post_type; if( ‘portfolio’ == $post_type ) wp_enqueue_style( ‘portfolio-admin-style’, get_stylesheet_directory_uri() . ‘/styles/portfolio-admin.css’ ); } add_action(‘init’, ‘create_portfolio’); function create_portfolio() { $portfolio_args = array( ‘label’ => __(‘Portfolio’), ‘singular_label’ => … Read more

More than one meta field in a single meta box?

I’m following this tutorial by Justin Tadlock on creating meta boxes. http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/ I can get a meta box with a single field to work without problem but I would like to create a meta box with several fields. For example a meta box called “Staff Details” with 2 fields called “Title” and “Experience”. Does anyone … Read more