Support » Plugin: WordPress Importer » How to import content and tag with existing users

  • I was importing content across an MU install. The new site did not have any users associated with it, so wp_users_dropdown() was blank. The result was that content always was assigned to the current user, even though the authors already existed in the user table.

    To re-use existing authors, even if not attached to the current blog, I tweaked this plugin a wee bit to add a get_user_by() check based on login. If the user exists with that login, it’s the user to whom the content is assigned. Here’s the bit to look for in wordpress-importer.php: https://gist.github.com/buley/92cb12c58247c560e85301ef8fb65aa9

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to import content and tag with existing users’ is closed to new replies.