Have you tried changing Line 83? Change 'post_type' => 'post', to 'post_type' => 'YOURCUSTOMCPT',
See Codex article for wp_insert_post for reference – codex.wordpress.org/Function_Reference/wp_insert_post
Related Posts:
- Submit post and upload image from front-end
- How to set a custom post type to not show up on the front end
- Front end post editing using a form
- Add custom post type items from frontend
- Front end registration/login & publish/update 1 custom post
- List custom post types in dropdown
- How I upload, save and set a featured image from my frontend?
- Trying to save custom post type from frontend partially working
- Reason action hook won’t work with update_post_meta from frontend form? Alternative?
- front end radio custom taxonomy with custom post type
- Assign category to front end post
- Front end post form won’t post categories to custom post type
- Create and edit posts from front end
- Make custom post type display as a page
- Upload Image from Front End and Resize
- Frontend posting – everything saves other than checkboxes?
- I am having a problem with form updating/editing WordPress post on the frontend
- WordPress Create Post from front-end
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- How to restrict CPT post’s fronted view only for specific user roles?
- How to save custom taxonomy from front end post submission
- Insert Custom Post Type data from the front-end by a user
- Crafting WP_Query array, sort by date
- Posting to a Custom Post Type from front end – user generated content
- How to get the upcoming post ID from front end?
- How to make front end form only accept certain values
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- How To Import CPT With Only Few TEXT ACF Fields From Front End?
- Submitting Custom Post Types with custom fields from Front-end form
- How to properly delete custom post type posts programmatically
- Get id from metabox dropdown
- Get admin area editor in frontend
- Better approach for a WordPress Inventory
- Display custom meta on page that has been check in custom post type
- Update ACF fields on a frontend form? [closed]
- Add term for custom taxonomy from front end
- Post visibility option to theme front-end for author to select?
- display custom portfolio tags
- Plugin needed to allow subscribers to post articles on the front end without admin approval [closed]
- How to create Custom image post?
- Front-end Image Upload to Custom Meta Box
- Preview url not working outside wp-admin
- Change custom post taxonomy values from front-end
- Saving Child Terms on front end not setting parent
- WordPress Front-End user restricted taxonomies
- Multi Photo Upload with Caption on Front End for Custom Post Type
- Front End users account with lots of user Roles (not Woocommerce)
- Show “Republished” badge when Post Date is manipulated
- Getting Custom post category from Form
- Add a meta to custom post type which corresponds to a particular taxonomy
- Add a image to a post published on a CPT from the front-end
- Extensive search filtering and results->PDF in the front-end
- Front end page submission form does not attach custom post type
- Issue with permalinks for custom post type
- Front end Submit not posting to Custom Post type
- Check in function on custom page
- create category upon saving post and save post in that category
- Front end post or photo or both
- Adding an Archive of Posts to the Navigation Menu in WordPress 3.0
- Possible to change the URL for the regular post type without affecting the URL of other custom post types?
- get_the_category_list or get_the_tag_list for custom post types and taxonomies?
- Is there a way to override the tag specified in header.php?
- Having a custom post slug that clashes with an existing directory
- wp_get_object_terms(): count relative to passed IDs?
- Debug whats going on inside a function called from AJAX
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- create a back-end wordpress content submission using custom post type
- Limiting number of custom posts shown on taxonomy page
- 404 error on custom post type
- Dynamically Create Custom Post Type According to Relationship Another Custom Post Type
- Fake mark a menu item as current_page_item/active in WordPress
- Show a Category X’s custom post type on Category X archive page?
- How do I display content to users who are not logged in instead of 404 on Private custom posts?
- custom post type and hidden url : what is the cleanest way to build CPT with custom page template?
- Structure of data : CPT + terms
- Disable saving posts as draft (make all posts mandatory regardless of the post status)
- How to remove post listing page for a custom post type
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Custom Taxonomy not being saved on custom posttype
- Taxonomy/Custom post type structure suggestion on a movie site
- Get Tags by specific Category of Custom Post Type
- How to sort the admin area of a WordPress custom post type by a custom field
- Custom Field values not Showing in Edit Page of Custom Post Type
- Display custom post types in wp_list_pages
- How to list tags from custom post type attachments?
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- widget_posts_args not using the number of posts in widget
- gutenberg message
- Getting custom post types to properly display alphabetically
- does wp_insert_term link the term to a certain post ID?
- Custom post type category permalinks and archive pages
- Submit Custom Postypes from frontend
- How to display posts from a certain category in a bootstrap 5 carousel loop with multiple items?
- How to show posts of the same category on a page?
- Edit post meta direct from post.php?
- Change the text on the Publish button
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- Filtering custom post types using category taxonomy
- set_post_thumbnail or media_sideload_image adds image multiple times in media library
- How to use wp_set_object_terms depending on page ID?