If I understood you correctly, you’re basically asking how to group inputs by post ID? If this is the case, you could do something like this
// group by input
name="renewal[<?php echo $post->ID; ?>]"
// when saving
$_POST['renewal'] // array of input values with each having post_id as key
Or
// group by post ID
name="data[<?php echo $post->ID; ?>][renewal/future-rent/etc.]"
// when saving
$_POST['data'] // array of arrays, each with post_id as key. post_id specific subarrays have input names as keys and input values as values
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 can I customize “Pages” admin (edit.php) and “Edit Page” admin (post.php) for bulk edit of custom content type?
- Community and User Generated Content Website: Have been thinking about Drupal but leaning on WordPress heavily
- Related links – from other sites
- 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?
- Display custom post type for specific user
- 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?
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- 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?
- 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
- Sort CPT by taxonomy AND THEN by custom field
- How to display *block number* instead *date value* on WordPress posts?
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- How to force one column layout on custom post type edit page?
- Custom field values deleted when trashing custom post type
- Custom Post Type – Taxonomy Dropdown Menu?
- How I check if the same post slug has not been used before publishing?
- How to sort a table of custom posts by column containing custom field
- Issue with saving custom post type when editor is removed
- convert Custom Fields Option-Values to Tags/Taxonomy
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- Display custom post types with custom date field value (before today) & order by custom date field
- How to get Custom Post ID by adding filter to child theme’s function
- Assign Taxonomy Based on Custom Field Value
- Customize permalink when creating a post
- meta_query compare >= not working but
- Including Custom Meta with posts_where query
- How to set up multisite for multi language?
- Filtering custom post type on a combination of custom taxonomies and custom fields?
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- Orderby CPT custom fields not working
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- How to create a custom post type with additional fields?
- Hierarchy and access control for Custom Post Types (CPT)
- Searching Custom Fields
- Custom Post Meta from custom metaboxes is randomly being deleted
- echo selected value from dropdown
- Get data from PHP to JavaScript to set position of each post on front page
- Get custom term meta problem on single post type
- Create custom WP_List_Table in post_type
- Filtering custom posts by custom fields (ACF) [closed]
- Incorrect ordering of custom post type based on time
- How can I see a list of products that I have set to outofstock through a custom field check box?
- delete duplicate meta_value with same post_id
- Filter search posts by post meta?
- Problem with customize page cached in WordPress.com [closed]
- Multiple categories assigned to a single product breaking the breadcrumb
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- How to convert Post Object Custom Field into Tags
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- I want to create a metabox under custom taxonomy
- Getting 404 on child page with pre_get_posts() on custom posts
- Sql Update CPT from publish to draft and particular custom field
- Limit posts per page depending on the size of a div?
- save_post affect creation and deletion
- Set a static page as a user profile page?
- How to keep a CPT stick to specific position?
- WP_Query for CPT with filter by another WP_Query
- How do I add custom fields to posts without having to manually add everytime I post?
- How to display custom post type ordered by a custom field date
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- WP_Query and two custom fields returns no posts
- I want to split this into two functions
- Repeatable Custom Field for Media Upload
- Problems with a custom meta_box
- How to apply order on custom taxonomy and custom meta key on custom post type
- How to store datetime from custom meta box so that it can be sorted by
- How to make a template for a specific post of a custom post type?
- Bulk update custom post types
- Custom Post type easy way for editors
- Adding a custom field after post title (ex.Example Title [30 Second Read])
- ACF select box css color change
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?