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
- How to force one column layout on custom post type edit page?
- Automatically generate custom post title based on meta
- Hide custom post type from nav menu manager
- category__in not working on custom post type
- Ajax filter with custom taxonomies
- Create a relationship between two custom post types?
- Adding Custom Taxonomy Archive Link to Nav Menu Shows Up As (Invalid)
- Having trouble understanding custom post type and taxonomy :/
- Get a permalink structure of /%posttype%/%category%/%postname%
- Custom Post Type loops and Disqus
- Take Variables Set in Functions.php and Echo Them Inside My Custom Post Template
- How to load custom post archives sub-pages with ajax?
- Customize permalink when creating a post
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Include multiple custom post types [closed]
- How do increase the amount of links shown down the left in the admin menu?
- Custom Field Order by Last Name and First Name
- How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/
- Sort CPT archive by order prevents sorting in admin
- How to create a custom post type with additional fields?
- How to make custom posts types display when published for the future
- How can I show 1 featured post in a styled element, and the next few below differently styled
- WP_Query of custom post type sorted by meta_key has unexpected results
- Nested Custom Taxonomies | Incorrect posts when querying
- Post Query not working
- Add a custom post when inserting a new user in WordPress?
- How to display a specific post type name in a breadcrumb
- If/Else child list for Custom Post Type single template within loop?
- How can I put content before my custom post type default pages?
- How to add page the same slug like custom post type?
- Store a value in global scope after init hook is fired
- Show custom post type event if current day using ACF
- Forcing two or more custom post type to be private
- Numeric pagination custom post type
- Enable Authors in Multiple Custom Post Types
- Dropwdown: Get taxonomy terms from posts that share preselected terms from 3 other taxonomies
- Custom post type loop without children
- Help understanding custom post type and children
- How to divide posts (custom post type) content on multiple pages?
- Custom term link return 404 error
- How to apply order on custom taxonomy and custom meta key on custom post type
- Updating a custom field in a custom post type