I am running the following piece of code (assume all variables have values) is a custom importer that I am trying for Joomla2Wordpress.
$ret_id = wp_insert_post(array( 'ID' => $pinfo, 'post_date' => $Posted, 'post_date_gmt' => $post_date_gmt, 'post_author' => $authorid, 'post_modified' => $LastMod, 'post_modified_gmt' => $post_modified_gmt, 'post_title' => $Title, 'post_content' => $Body, 'post_excerpt' => $Excerpt, 'post_status' => $post_status, 'post_name' => $sefurl, 'comment_count' => $comments_count) );
However while the code inserts post correctly, the comments count is not updated (remains zero). The codex page doesn’t mention the parameter at all.
Can anybody help?
- The topic ‘wp_insert_post fails to add comment_count’ is closed to new replies.