[wp-hackers] Adding meta data to categories

Brian Krausz brian at nerdlife.net
Fri Jan 9 17:13:08 GMT 2009


Also, my plugin abstracts that API into a GUI, may help with what you're
trying to do.

http://wordpress.org/extend/plugins/custom-taxonomies/

--Brian

On Thu, Jan 8, 2009 at 7:40 PM, Austin Matzko <if.website at gmail.com> wrote:

> On Thu, Jan 8, 2009 at 5:18 PM, Mike Schinkel <mikeschinkel at gmail.com>
> wrote:
> > SET @term_id:= 3;
> > INSERT wp_terms (term_id,name,slug,term_group) VALUES (@term_id,'Category
> > Tags','category-tags',0);
> > INSERT wp_term_taxonomy term_id,taxonomy,parent,count) VALUES
> > (@term_id,'category_tag',0,0);
>
> There's no need to do direct MySQL queries.  WordPress's taxonomy
> system has a very rich API.
> See register_taxonomy(), wp_insert_term(), and wp_set_object_terms().
>
> >   the term_taxonomy_id should be set
> > to the term_id of the tag that you want to apply to this category.
>
> Actually---and confusingly---term taxonomy ids and term ids are *not*
> the same (sometimes they happen to be the same).
> _______________________________________________
> 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