How do you get the default custom field UI for custom post types?
views:
3answers:
1
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
2010-09-28 18:14:04