Why use gravity post if you just want to do post add/insert + post_meta (assume on front-end), we can do it as long as we give a registered user certain capabilities. We can achieved this by creating custom role for user to add to specific custom post type, . For email notification you can use native wp_mail on wp_insert_post function (logged_in)
$orderpost = array(
'post_title' => $title,
'post_status' => 'publish', // Choose: publish, preview, future, etc.
'post_type' => 'item-order' , // Use a custom post type if you want to
);
$the_inserted = wp_insert_post($orderpost); // Pass the value of $post to WordPress the insert function
after post succeed ($the_inserted = id of ‘item-order’) we can create function such as add_post_meta, update_post_meta, wp_mail or wp_redirect
Cheers 🙂
Related Posts:
- what is the correct way to compare dates in a WP query_posts meta_query
- don’t publish custom post type post if a meta data field isn’t valid
- Search multiple custom fields by using meta_query
- Add custom field to media attachment image attribute in post editor
- Custom Post Type with Custom Title
- How to create download links based on Custom Fields with Rewrite API
- How can I customize “Pages” admin (edit.php) and “Edit Page” admin (post.php) for bulk edit of custom content type?
- Custom post metadata not appearing in public API
- Community and User Generated Content Website: Have been thinking about Drupal but leaning on WordPress heavily
- Related links – from other sites
- Saving repeated option values in a custom query
- Assigning the same custom meta box to multiple post types
- Dynamically add / duplicate custom meta in custom post types
- How to insert content from another Custom Post type into Post?
- How to structure a site with product variations pages?
- Cannot save CPT meta box
- don’t publish custom post type post if a meta data field isn’t valid
- custom post data – how to
- How to customize work area / admin area in a custom post type without plugins?
- How to display custom field value on page?
- WordPress custom API endpoint – how to make the request more flexible
- Display custom post type for specific user
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- How to hide a custom field from admin?
- How to keep a record of changes to a custom field?
- Adding a Custom Field to be used by Posts 2 Posts
- How do I ensure that post_type and Taxonomy use the same slug?
- Custom Form / Search with Custom Post Type Data
- Adding a location field to buddypress activity
- Auto update publish date of CPT Post if default post custom field value match to cpt post CF Value
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- How can I fetch all the dates from custom fields from various different custom post types and show / list them at one place in ascending order?
- Displaying posts inside table having issues
- Automatic Set Category For A Custom Post Type
- How to Disable option of meta field if that option is selected for any other post in custom post type?
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Creating multiple CPT posts from one Gravity form
- Select Menu for Custom post Type does not save
- How can i display on front page a movie that is atached in a post type
- Exposing custom fields to the user in custom type post
- Creating post custom field text area
- display posts, pages and custom post types from another wordpress site
- Sort CPT by taxonomy AND THEN by custom field
- How to display *block number* instead *date value* on WordPress posts?
- How to consume external API from WordPress post editor and display the response data in the custom field?
- How do I set the default admin sort order for a custom post type to a custom column?
- Linking Two Post Types
- How can I change the admin search posts fields?
- WordPress 4.4+ : How to revision CPT + metadata
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- How to select one major category (or custom taxonomy) for a custom post type?
- front end radio custom taxonomy with custom post type
- How to get source of custom meta image?
- Displaying Meta Box Image
- Custom field default value with counter
- Sub-Sub-Blogs — creating and importing content into a custom sub-type
- Check if a specific custom field exists?
- WordPress Create Post from front-end
- Show Two custom Post type and their posts on category page
- Calculate all custom field values in the post loop
- add custom field to custom post type
- Role scoping for contributors down to the field level
- Make parts of your wordpress website completely built with data from external APIs?
- Display custom fields from custom posts in RSS feed
- Can we create a custom post template for a specific page template
- Settings API – save multiple tabs at once
- Remove Quick edit for custom post type?
- Add post meta programmatically to attachment
- How to create multiple editor?
- Get Specific Template Part if Custom Field is Some Value
- Displaying multiple post types on home page
- Conflict between wp_list_pages and get_posts – list pages not displaying
- How to make a pulldown menu display custom meta terms in a theme?
- How to copy a custom field from the user’s CPT to the user’s normal posts
- Different videos for different posts
- Make a custom column sortable by a value from a different custom post type
- Problem On Retrieving Post Meta Data on Custom Column [closed]
- Post visibility option to theme front-end for author to select?
- Mandatory field in Custom post
- How to store the third party script with HTML code in the wordpress custom input field?
- How To Read Read Custom Post Type Data in Headless CMS Mode
- Filter custom post type admin list by custom meta column, where the column is another custom posts meta value
- How to display custom field in product description?
- Where is get_post_meta value located?
- Set a Default CPT taxonomy by taxonomy id
- WordPress deletes custom posts instead of trash them
- Sort loop by custom field from different post type
- Meta_query by date for Events archive
- WordPress loop, show only one post per custom field
- Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?
- Custom Post Type as invoice or order template
- Collection of fields in a single post
- Get result from Custom Field in Custom Post type
- Make each Value of custom field show related posts when clicked
- What’s the best way to show custom post types? With page template it’s not perfect!
- How to get lowest price from custom fields of posts
- Send email on creation of custom post type and use get_post_meta()
- WordPress does not show the custom fields box