40 Comments

  1. Sami Keijonen

    This is great. Term meta and the tutorial!

    I’d really like to see term image plugin. Is there a similar script like wp-color-picker for loading images from the media library? Or standard way of doing it?

  2. inditheme

    yes, it’s great. Waiting for WordPress 4.4 alive.

  3. […] have a clue as to what taxonomy term meta is, I highly encourage you to read Justin Tadlock’s explanation and tutorial. In the post, Tadlock explains why term meta is significant and some of the possibilities it […]

  4. Marc

    My clients mostly ask to be able to order terms.
    I usually use a plugin for that, but would this be a good case of use (“order” as term meta)?

  5. JJJ

    Great write-up as always.

    I made this base class a while ago to help spin-up speedy term-meta interfaces:

    https://github.com/johnjamesjacoby/wp-term-meta-ui

    Y’all feel free to rip it apart if need be.

  6. […] Source: Introduction to WordPress term meta […]

  7. Piet

    Hi Justin, please consider me slow on the uptake; I simply don’t understand the purpose of these term meta data. Take your detailed example, now you have great colors of categories in the backend! Is there any functional use for these in the frontend? I fail to see it and would appreciate if you can shine a light on that for me.
    Thanks.

  8. Pablo Cruz

    Hello, Justin. Sorry if this has already been addressed but: Will it need a new DB table for terms meta? Thanks!

  9. John Farrar

    What about related post types, say we had a post type for orders and a post type for order items. Relationships like that, we of course should not store the main post type style data in a post collection.

    Yet, I am wondering if the term meta could be used to use a one to many relationship index or a many to one index relationship. What doesn’t seem pragmatic is a many to many relationship using term data. This is one of the most common related data not yet part of WordPress.

    Could you share your thoughts on how to deal with those three relationships. Especially it would be great if we could figure out how to do this as friendly as we do with the new term meta!

  10. brody

    can the form be displayed on the front end using a short code?

  11. […] tags, etc, that we’ve been able to do with posts for years. And as Justin Tadlock mentions in this tutorial, the API of it is pretty unexceptional. But that’s specifically why it’s so great: […]

  12. François Dejardin

    Wooow !

    That’s exactly what i need 😉 that’s a great news, can’t wait to test it !

    thanks a lot 🙂

  13. Anh Tran

    Nice tutorial. This will be a great resource for people as WordPress 4.4 was just released today. Term meta opens a lot of opportunity for developers. I’m gonna to integrate it with my Meta Box plugin. So exciting!

  14. François Dejardin

    Woow,

    Just integrate your solution in a project and it works just fine.
    This feature will really change the way we consider WP development !

    Thanks again !

    François

  15. […] seems to be no simple tutorial on how to add a basic text field to a Taxonomy. I tried to adapt this awesome tutorial by Justin Tadlock to my needs, removing all the code relating to the color picker and replacing it with a simple text […]

  16. […] 参考文章:Introduction to WordPress term meta […]

  17. Jason King

    Really helpful guidance, and I’ve put it to use already. This feature is so new, there aren’t many good tutorials yet.

    If I was going to use taxonomy meta to enable images to be associated with categories, how would I use a form control to upload an image to the field instead of using a color picker? Any thoughts welcome!

  18. AJ Clarke

    Great guide! I love the new term meta it’s so much more intuitive then saving taxonomy values in the options table.

    One quick note though…instead of using both the edit_category and create_category action hooks you can just use the edited_category.

    – AJ

  19. Joel

    Thanks man, super helpful.

  20. […] 4.4 was released recently, and they added a really cool, and finally official, way of storing meta data for terms. For those who don’t know, terms are things like your categories and […]

  21. […] problems. If you’d like to learn more about term meta and how to use it, I encourage you to read this tutorial by Justin Tadlock. What use cases or scenarios can you think of where the visual queues described […]

  22. […] any problems. If you’d like to learn more about term meta and how to use it, I encourage you to read this tutorial by Justin Tadlock. What use cases or scenarios can you think of where the visual queues described […]

  23. Uugic

    Hello.
    Thanks for the awesome tutorial. I’m sorry. I’m not good developer. How can i fix it Notice: Undefined variable: term_id in

    • Uugic

      Please delete this comment. i found solution. Thanks again for theme amazing very useful tutorial.

  24. Harvey

    Hi Justin,

    Can the taxonomies themselves (post categories, custom ones etc) also have arbitrary metadata assigned [*_taxonomy_meta()] or is does this apply just to their terms?

    • Justin Tadlock

      No, you can’t have taxonomy meta. Only objects can have meta. In this case, the object is the term. It’s just like posts and comments (objects) can have meta but post types and comment types can’t.

      • Harvey

        Ok, that makes sense, thanks. I suppose that post/comment types could be regarded as metadata in themselves for the creation of posts & comments, just as OOP classes are for instanciating objects. I’m not sure if this inorthogonality re. metadata makes sense for taxonomy though as these aren’t used to stamp out new terms but more as a container for grouping them as I see it.

Comments are closed.