Extended API
[resolved] custom post taxonomy (2 posts)

  1. eduardovc
    Posted 2 years ago #

    I have custom posts with custom taxonomies. I want to create a new custom post in a category. Everything works fine except the link to a custom category. The API says to use 'terms_names', but I don't have explanation about the usage of this variable. The code below:

    'mt_allow_comments'=>0,  // 1 to allow comments
    'mt_allow_pings'=>0,  // 1 to allow trackbacks
    'terms_names' => array('ad_cat' => 'Audi'),


  2. michaelgrosser
    Plugin Author

    Posted 2 years ago #

    Just to confirm, are you trying to do this with my extended API plugin or are you using the native XML-RPC method to do this?

    If you're using my plugin, then you'd create a post with wp_create_post() and then use wp_set_post_terms() to assign the post to categories.

    You may be able to use "tax_input" attribute from the create post method to accomplish the same thing. See this page in the codex: http://codex.wordpress.org/Function_Reference/wp_insert_post

    The format you're using above seems to suggest that you're trying to use the native API method and not my plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.