How to add term to attribute programatically
-
Hi, how to add for example for attribute pa_brand a term programatically ?
Do I need to use insert_term function ?function custom_taxonomy() { wp_insert_term( 'Apple', // the term 'pa_brand', // the taxonomy array( 'description'=> 'A yummy apple.', 'slug' => 'apple' ) ); } add_action( 'init', 'custom_taxonomy', 0 );
But this one not working … any ideas ?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to add term to attribute programatically’ is closed to new replies.