Horje
Need to auto select authors on import - Wordpress Solution
I'm importing a ton of custom post types from another WordPress site that have about 500 different authors. I've moved all of the user IDs to the new site, but the default WordPress import is going to make me manually assign 500+ authors of posts. This code appears to auto select them: https://gist.github.com/webercoder/2870698 But I don't know how to get that to work. I need a way to import my custom posts and auto select the authors based on the authors from the past.

Solution - 1

It looks like you have to add that Jquery to the upload process page. Try creating a folder for the jQuery and call it on admin pages. Create Folder: /admin.js Call it by adding the following in your function.php: function admin_enqueue($hook) { if ('admin.php' !== $hook) { return; } wp_enqueue_script('my_custom_script', get_stylesheet_directory_uri() . '/js/admin.js'); } add_action('admin_enqueue_scripts', 'admin_enqueue'); You also might be able to use the free version of this: https://wordpress.org/plugins/wp-ultimate-csv-importer/ You might need the premium. But, you can export it first from the one site, and reupload on the new site.


Solution - 2

How you have imported the post types?





Wordpress

Related
Merging post data from post ID on edit screen - Wordpress Solution Merging post data from post ID on edit screen - Wordpress Solution
Shortcode not working on AJAX call - Wordpress Solution Shortcode not working on AJAX call - Wordpress Solution
Extent the_post_thumbnail() function with a third parameter - Wordpress Solution Extent the_post_thumbnail() function with a third parameter - Wordpress Solution
Load plugin only on woocommerce product pages - Wordpress Solution Load plugin only on woocommerce product pages - Wordpress Solution
I want to display same font-size in Event calendar - Wordpress Solution I want to display same font-size in Event calendar - Wordpress Solution

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
16