Skip to content

Instantly share code, notes, and snippets.

@mir4a
Created October 14, 2013 03:10
Show Gist options
  • Save mir4a/6970102 to your computer and use it in GitHub Desktop.
Save mir4a/6970102 to your computer and use it in GitHub Desktop.
Create new posts using terms as reference
INSERT INTO wp_posts (post_author,post_date,post_date_gmt,post_modified,post_modified_gmt,post_content,post_title,post_status,post_name,post_type,mmm_term_id)
SELECT '1',now(),now(),now(),now(),'db_flow',name,'draft',slug,'course',term_id
FROM wp_terms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment