[wp-hackers] Display tag admin box like categories, without hierarchy

Tom Barrett tcbarrett at gmail.com
Thu Apr 5 08:51:44 UTC 2012


On 4 April 2012 16:34, John Blackbourn <johnbillion+wp at gmail.com> wrote:

> On 4 April 2012 15:58, Tom Barrett <tcbarrett at gmail.com> wrote:
> > "I want to register a custom taxonomy, without hierarchy, but have the
> > back-end work like categories do and not like tags.
> >
> > That is I want the (tags) to be listed with checkboxes by them (like
> > categories are), but I don't want hierarchical children available.
> >
> > Is there a nice way to do this?"
>
> It's easy enough. You just need to remove the default meta box and
> then add your own one which uses wp_terms_checklist() to output the
> terms.
>
> I've pasted a code example here: http://pastebin.com/MswB57Fn


Amazeballs! Thanks John :)

Line 3 needs to be: add_action( 'add_meta_boxes', 'do_my_meta_boxes' );

-- 
http://www.tcbarrett.com | http://gplus.to/tcbarrett |
http://twitter.com/tcbarrett


More information about the wp-hackers mailing list