tags:

views:

3

answers:

1

How do you get the default custom field UI for custom post types?

A: 

All you have to do is put custom-field in the supports part.

example

register_post_type( 'location',
    array(
      'labels' => array(
        'name' => __( 'Locations' ),
        'singular_name' => __( 'Location' )
      ),
      'public' => true,
      'show_ui' => true,
      'supports' => array('title',
                'editor',
                'thumbnail',
                'excerpt',
                'custom-fields'
            ),
      'rewrite' => array('slug' => 'locations')
    )
  );
Drew LeSueur