It’s definitely possible, I believe you are on the right track.
You might wanna add a check if a post already exists with this title, because you’re likely to run into some PHP timeout issues with your script. That way you can run the script several times and create all the posts.
You can use the post_exists()
function for this:
if( post_exists( $term->name ) ){
continue;
} else {
wp_insert_post($args);
}
Related Posts:
- How do I append multiple taxonomies to the URL?
- Creating “static” taxonomies to choose from, inside custom post type?
- Custom Post Type with Custom Title
- changing meta value and meta key of price field
- WooCommerce sort products by the actual product width(not the shipping width)
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- Redirect to another page using contact form 7? [closed]
- Problems making shortcode with custom post types and taxonomy
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Question about link two types of data in wordpress
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Set a Default CPT taxonomy by taxonomy id
- Custom Taxonomy is disabled on Edit page
- Sort by Custom Post Type (Multiple Loop)
- Query multiple post of which one by taxonomy
- Issue On Listing Woocommerce Parent Tag List
- Restrict custom post type to only site administrator role
- How to force one column layout on custom post type edit page?
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to limit the number of terms (terms acts like categories)
- Search multiple custom fields by using meta_query
- Taxonomy term in permalink
- Redirect after deleting post and keep track of pagination
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- How would I leverage custom Taxonomies in this scenario?
- Group list of posts by taxonomy and allow for pagination
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Disable WordPress Recognizing Path as Attachment
- remove_action conditionally for Custom Post Type
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Paginate_links won’t create the right links on a taxonomy filtered custom post type archive
- How to get Custom Post ID by adding filter to child theme’s function
- How to filter out post type meta?
- Remove All, Published and Trashed Post Views in Custom Post Type
- WordPress if in term*
- Weird problem happening with custom taxonmy when creating/updating posts
- CPT: if more than X images are in post, use pagination
- Update permalinks when new category added to custom post type taxonomy
- Conditional Query of Custom Post Type and custom taxonomy
- Taxonomy custom post type URL
- Structure of data : CPT + terms
- Default text in a specific post type, but not visible?
- Woocommerce custom field search in custom post type [closed]
- How do I display the taxonomy for a custom post type in an array
- Modifying custom post type created by WooCommerce
- Suggested Post and Taxonomy structure
- How to remove post listing page for a custom post type
- How to include term custom meta into the custom taxonomy term permalink structure
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Linking from CPT page to taxonomy.php
- Change “empty trash” button text?
- Filter second dropdown (tax) based on first dropdown (cpt)
- Move Genesis Single Page/Single Post Title
- How can I create an automatic drop down menu with my tags?
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- why post_class() function apply css classes to all other files?
- Custom taxonomy template shows 404 Error
- Display Custom Post Types Glossary
- Custom Post Type API doesn’t show taxonomy or category array
- Custom Post Type to replace Woocommerce products – page not found error
- Custom Post Type with modified permalink structure results in 404
- Convert Custom Table Data Based Plugin To Be Searchable
- Custom Post taxonomy template
- How to use taxonomy term as permalink folder
- WP 3.1 custom post type permlinks
- Placing Admin Post Metaboxes in Tabs
- Why is my custom post content only viewable when signed into WordPress?
- automatically select taxonomy based on post meta
- Display related CPT with custom taxonomy
- Querying posts that don’t have a certain key value or don’t have the key
- Custom post types not showing on the standard WordPress Category page
- Display 3 level taxonomies
- List posts that have the current url taxonomy
- Limit posts per page depending on the size of a div?
- Delete Post by User
- Custom Taxonomy not working front side Woocommerce
- WooCommerce breadcrumb display custom posts instead of product data
- Wrap an X amount of taxonomy posts in a separate Row in WordPress
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Problem to get the link of the default ‘post’ post type like the orther custom types
- Complex strcuture as CPT or taxonomy for use in woocommerce product variations [closed]
- WP_Query for CPT with filter by another WP_Query
- Custom Search not working
- Custom post type post taxonomies
- Problems with custom post type and hierarchical permalinks
- Problems with a custom meta_box
- Structure of custom post type / taxonomy?
- How to make a template for a specific post of a custom post type?
- Display associated taxonomy child name on single CPT page
- ACF select box css color change
- Creating post custom field text area
- Delete old thumbnail when updating new