WordPress.org

Ready to get started?Download WordPress

Forums

Add a Taxonomy Term (5 posts)

  1. daurora
    Member
    Posted 4 years ago #

    I am testing the GD Taxonomy Tools plugin - works great , nice coding.

    My question: Is the method for programatically adding a Taxonomy Term to a Post, the same as adding a Category value?

    For example: to add a Category value, I understand you need to be passed as an array of integers that match the category IDs in the database.

    e.g. $my_post['post_category'] = array(8,39);

    I would like to know how to do this using a Taxonomy rather than a Category.

    Thank you,
    daurora

  2. MichaelH
    Member
    Posted 4 years ago #

    Don't hold me to it, but look at Function_Reference/wp_set_object_terms

  3. Milan Petrovic
    Member
    Posted 4 years ago #

    Yes, there is a set of core functions for all that, and the format is similar to post-tag or category. I also added several functions in plugin (yet to be documented), but located in code/fnc/ folder of the plugin.

  4. Joel
    Member
    Posted 4 years ago #

    Does this plugin provide any functionality for hierarchical taxonomies?

  5. Milan Petrovic
    Member
    Posted 4 years ago #

    It does now, but that requires WordPress 3.0, since that is first version to implement that.

Topic Closed

This topic has been closed to new replies.

About this Topic