I believe it is better if you use the ajax method instead of sending the POST to the same page.
You can use javascript to increment the form / fieldset. Use an array for the name e.g
<input type="text" name="ingredient[]"/>
If you want to edit the post, just you us the saved data on the value attribute, e.g
<input type="text" name="ingredient[]" value="<?php echo get_post_meta($post->ID, 'ingredient[0]', true) ?>"/>
If the post meta using a same meta_key, just put it in the for each loop.
Hope this help
Related Posts:
- Front-End Post Submission
- How to get Images included in Post
- How to upload post thumbnail while wp_insert_post?
- Publish pending article from front end with a button?
- How to know if get_posts() failed?
- Get names of authors who have edited a post
- How do I sort (order) the results from `get_children()`?
- Edit a post from frontend. post_tags get saved, but not separated
- how to display full post with pagination on home page
- Developing a secure front end posting form
- How can I edit a post from the frontend?
- Developing a secure front end post editing form
- Post from front-end only by logged in users, form posts as “posted by:
- upload featured image from front end using wordpress add media button
- How do I change the gallery that is inserted in the post?
- Posts Page Featured Image [closed]
- Displaying Page Title on index.php
- How to enqueue scripts depending on post formats?
- How to Replace the WordPress Featured Image with a Video?
- Frontend Post Excerpt field mapping
- Convert a complex webpage into WP theme
- Frontend Post Form Validation
- How to load a different header based on post format?
- Changing next and previous post link text
- Understand post type
- Mark menu item as current-menu-item for category
- Understanding and using metaboxes in posts
- Why won’t my taxonomy query show up?
- Admin Notices don’t display on the admin screen for certain post
- Why orderby=”date” does not support manually changed posts?
- Static page does not show my posts
- I am unable to publish/update post
- page.php showing loop of posts and not page content
- Custom WordPress Theme: Publish Date and Display Date for posts right beside each other
- How to show single post page as home page
- Redirection not working in this front end post submission form?
- Exclude category from
- Blog page not working
- How to display the link (title) and thumbnail post?
- Underscores Theme Unit Testing – Catching Untitled Posts
- get_the_excerpt() is not working as expected – returns wrong text
- How to use format post in a pertinent way
- Unable to restore from backup – how to obtain old blog posts?
- How to change the color theme per post?
- Adding an image to a non existing post
- How to make a bilingual front-end post using the plugin WP User Frontend and Polylang or qTranslate?
- Change Post Status From Front End
- Disable sticky option for specific categories
- Highlight static blog page link in header
- 404 error on default post type and default taxonomy fronted page
- How to create a template for Pages?
- How do I do a page break?
- Block editors annoying warnings
- What does WordPress do if I save a post without content/title? [duplicate]
- How to add a class to edit_post_link?
- Admin – no Featured image choice in create new/page|post
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Lock post editing to one user at a time – wp_check_post_lock
- Front end post submission form with duplicate type fields
- how to hide empty fields of post category description?
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- Give posts a particular template based on the assigned category
- Display Featured Posts Grid on Static Page (Gazette)
- how to handle the loop using filling bootstrap grid structure?
- Can i have more than one form for front end posting in one template [closed]
- Cant’ Grab WordPress Built-in Posts Through Loop
- Change default post style to columns
- Get Users Post ID
- How do I allow certain users to make a certain type of post?
- How to add a post class on every post. (on homepage)
- I can’t find the relevant part of the loop in my theme file. How do I find the full content with “More…”
- WordPress Architecture as a CMS – Posts & Pages
- WordPress wp_editor to post and edit
- Am getting duplicate data from get_posts()
- Change modified date to current date when title updated automatically
- How to limit post (Exception pages) for current user in each role in front end?
- Add a field in my rest api
- Permanently deleted posts still exist
- created post displaying differently on front end
- Aligning images in the wp editor not working. How do i get this to work in custom theme?
- How to pull latest posts from a specific category
- Problem paginating a subquery on a post
- Moved a website and excerpts don’t work for old posts
- Create posts by any logged in users
- How to prevent clicking on posts
- How to generate an HTML link automatically from URL in a users’ post
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- how let users select categories for posts in frontend?
- Integrate video and iframe in a post type gallery
- How to put the WordPress blog into theme
- Display post order ranking within wordpress loop
- Allow reader to reorder posts for themselves (oldest first)
- Displaying a specific sub-category’s posts from wp_query
- Trim excerpt to first paragraph
- Posts only showing on /localhost/wordpress/ and not on other pages
- Send the post id to a front end edit post form
- Post are not showing up
- Show category name in category.php when posts assigned to multiple categories
- Show posts assigned to multiple categories in current category page