Taxonomy not attached to post
-
import post by program.
I use :$term[] = “sport »; $my_post = array( post_title’ => $title_headline, post_content’ => $body, post_excerpt’ => $postExcerpt, ‘post_status’ => ‘publish’, ‘post_category’ => $term, ‘post_type’ => ‘post’, post_author’ => $userID, ‘tax_input’ => array(‘category’ => $term), ‘post_date’ => date( ‘Y-m-d H:i:s’, $thisrevisioncreated ) ); $new_post = wp_insert_post($my_post);
The post is created, but taxonomy is not attached to the post. Why ?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Taxonomy not attached to post’ is closed to new replies.