When updating a record, all labels are added to the post, however the number of records at the label is "reset". However, if you simply update the record through the WordPress admin area, everything “works” as it should.

When posting via wp_insert_post tags are added and the tag increases the number of posts, but after wp_update_post tags remain in the post, but the post is lost due to the post, while viewing the archive by tag, everything is displayed correctly, but if you select tags through get_tags the output goes without the desired result.

Neither this method helps:

 $directory = array( 'ID' => $directory_post_id, 'post_type' => $directory_category, 'tax_input' => array( 'post_tag' => $directory_tags )); $directory_post = wp_update_post($directory); 

Neither this method:

 wp_set_post_terms( $directory_post_id, $directory_tags, 'post_tag', false ); 

Several register_post_type , the tags 'taxonomies' => array('post_tag') attached to all

  • It is necessary to throw off the cache - mihdan
  • @mihdan, how is it possible to do this without the participation of plug-ins? - Site Baker

0