Support » Plugin: Extended API » Multiple terms for one post

  • Resolved tkmedia


    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?


    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.

Viewing 1 replies (of 1 total)
  • Plugin Author michaelgrosser


    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple terms for one post’ is closed to new replies.