WordPress.org

Ready to get started?Download WordPress

Forums

Extended API
[resolved] Multiple terms for one post (2 posts)

  1. tkmedia
    Member
    Posted 1 year ago #

    In your example you just update one term.
    args' => array(
    'post_id' => 1,
    'meta_key' => 'Michael',
    'meta_value' => 'Rocks',
    'unique' => false)
    );

    If I have multiple terms.
    Do I have to loop through the terms and update them one at time or can I update multiple terms at once?

    If so can you post or update your sample?

    Thanks

    Tim
    P.S on the setup screen would it make sense to add a toggle to select and deselect the api modules available. for I may only need a couple and it will take several minutes to deselect the many options.

    http://wordpress.org/extend/plugins/extended-xml-rpc-api/

  2. michaelgrosser
    Member
    Plugin Author

    Posted 1 year ago #

    The example uses add_post_meta(), which only supports adding a single key/value to a post's meta data at a single time.

    Since the main idea of the module is to make the typical WordPress hooks available, you can pretty much always check the WordPress documentation to see what you can and can't do with any particular method. The plugin should support calling any WordPress method and passing any parameters that the given method supports. The example just shows one sample of calling a WordPress method so that users of the plugin can ensure their overall syntax is correct, rather than trying to show an example of everything possible with the plugin.

    I'll note the toggle for the next release of the plugin, thanks for the idea.

    Let me know if you have any other questions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.