WordPress.org

Support

Support » Alpha/Beta » Custom meta boxes for custom post types

Custom meta boxes for custom post types

  • I’m using the following two lines and 2 functions to enable a custom meta box for posts – is it possible to enable these for custom post types?

    add_action('admin_menu', 'my_add_custom_box');
    add_action('save_post', 'my_save_postdata');

    Post types have been registered with code like so:

    register_post_type( 'projects', array(
    	'label' => __('Projects'),
    	'public' => true, 'show_ui' => true ,
    	'supports' => array('title', 'author','editor','excerpts', 'custom-fields', 'revisions', 'comments' )
    	)
    );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom meta boxes for custom post types’ is closed to new replies.