Skip to content

Instantly share code, notes, and snippets.

@spsaucier
Created July 20, 2013 06:25
Show Gist options
  • Save spsaucier/6044070 to your computer and use it in GitHub Desktop.
Save spsaucier/6044070 to your computer and use it in GitHub Desktop.
Wordpress - Import Posts - Assign to Author
$('#authors > li').each(function(){
var textstring = $(this).find('strong').text().split(" (");
console.info(textstring[0]);
$(this).find('select[name^=user_map] option').filter(function() {
return $(this).text() == textstring[0];
}).prop('selected', true);
});
@anil3a
Copy link

anil3a commented May 15, 2017

Life Saver, Thousand Thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment