[wp-hackers] how to add custom taxonomies to the post screen
Kailey Lampert
trepmal at gmail.com
Fri Nov 4 04:31:24 UTC 2011
Adding 'post' makes the custom taxonomy's box appear in the admin.
register_taxonomy( 'taxonomy_name', array( '*post*', 'custom_post_type' ),
$args );
You may also need to have the 'show_ui' parameter in $args set to true.
add_action('init', function() {
register_taxonomy('custom_tax','post',array(
'label' => 'Custom',
'show_ui' => true,
));
});
Kailey Lampert
twitter: @trepmal
trepmal at gmail.com
On Thu, Nov 3, 2011 at 7:26 PM, Caio Rogerio Ribeiro
<caiorogerio at gmail.com>wrote:
> Are you talkin about the admin or the theme?
>
> Enviado via iPhone
>
> Em 03/11/2011, às 22:01, IC IC <icwordpress at gmail.com> escreveu:
>
> > Hi,
> > By default, when adding a post, we see on the post screen some categories
> > box to choose some categories and the tags box to add some tag terms...
> > I created a few custom taxonomies. How do I make them show on the post
> > screen?
> >
> > This is not an issue when you deal with a custom post type. Cause at the
> > time of post type creation phase, by using the custom post type plugin,
> you
> > can just pick and choose from those available custom taxonomies.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list