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?
- Where can I find the missing page sections in wordpress?
- WP All Import – Using Xpath to set a select value
- How to change post featured image using a custom field of category?
- Publish an XML feed from a CPT with ACF fields?
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- How do I get the intended post type of a revision post?
- How to create shortcode to display custom field value on a custom post type
- Group posts by custom post type
- Confusion regarding Nonce & using it in Custom Columns for Saving Checkbox Value to Post Meta
- Custom Page that comes with preloaded content for the user
- Automatically update custom field in all posts of a custom post type
- WP_Query: include custom post type only with specific meta value
- Is there a way to get a file URL from the relationship ACF field?
- Display custom fields on post excerpt or teaser
- WP_Query orderby modified to include custom meta changes
- WordPress custom loop filter by meta_key and value with serialize data
- How inefficient is it to use a Custom Post for 4-5 sentences & pull all to 1 page?
- Adding Show Less/More link to Custom Post Meta
- Returning a list of custom post types excluding those without a specific meta_value
- Want to Add Custom Fields for Uploading video to WordPress Users from front end
- Keep display metadata value on backend – Custom Metabox
- How to bulk copy custom fields between custom posts?
- Sorting custom post type columns with external data and without meta values
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- How to check post type (to include custom css)
- Meta Key Value in current-user-only loop
- How to customize a permalink (URL) structure?
- Retrieve value of a category’s custom field
- Calculate all custom field values in the post loop
- Rewrite and custom post type: order by custom field not working
- Plugin: register custom post types, child ready and performance best practices
- add custom field to custom post type
- How to set up multisite for multi language?
- CPT Group by Date metabox Value
- How to check if user meta field is empty in conditional else statement
- Replace text in post from cvs
- Admin search ACF relationship
- Display only one post each WEEK
- wp_query check if integer exists in custom field’s array
- How can I dynamically add a post to a custom post type which uses a custom field?
- How to Mass Delete Images from Media Library
- Filtering custom post type on a combination of custom taxonomies and custom fields?
- Custom Posts Types as Custom Fields
- Get image post ID in media upload
- Why is my select meta data not saving?
- Permalink structure by Post Meta value
- dynamically add a custom field or metabox to custom post type [duplicate]
- Give a permalink to Custom Post Types without title
- Role scoping for contributors down to the field level
- How to implement a Google map store locator
- Creating a Custom Post as a repository for theme constants
- How to integrate video slide using custom post types?
- search also in taxonomy, tags and custom fields
- Random image from tag/custom type on sidebar