Support » How-To and Troubleshooting » [Resolved] wp_set_post_terms, example needed

[Resolved] wp_set_post_terms, example needed

  • here is the thing, i think i do not understand the function correctly wp_set_post_terms() so i need a helping hand here.

    i have a custom post type “products”, with custom taxonomy “product-category”.

    i have te following:

    add_post_meta($post_id, 'product_color', 'red', 1);
    $terms = array( 'cars', 'boats', 'bicycle' );
    wp_set_post_terms( $post_id, $terms, 'product-category');

    the post meta is correctly added, so what am i doing wrong with the wp_set_post_terms function?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] wp_set_post_terms, example needed’ is closed to new replies.