I’m importing from MT to WP, and I want to preserve the post numbers in my MT entries so the URLs will still work. I’m following import instructions provided by Dr. Bacchus, as cited in the Codex.
But I’ve run into a snag. Dr. Bacchus recommends that you edit WP’s mt-import file so that the database query will import that post ID. In the new WP version 2.02, however, there is no place in the query to indicate what fields are being populated, the way you would in a normal SQL query.
Here is the actual query that appears in the WP-2.0 mt-import file:
$postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt');
$post_id = wp_insert_post($postdata);
How do I modify this query so that it will insert a custom post id?
If this were a standard SQL query, I would know how to modify it. But since it seems to be a proprietary querying system, I’m worried about mucking something up.
Thanks in advance for any help.
- The topic ‘Importing MT Post ID’ is closed to new replies.