This more of a PHP + Logic question than a WordPress one but I think the solution is pretty simple.
- Loop through some code to generate the existing boxes or the boxes with
existing values - And always print one empty box for a new image.
For example:
foreach ($my_existing_boxes as $k => $v) {
// not sure how your code works exactly
}
new MultiPostThumbnails(
array(
'label' => 'New Image',
'id' => 'feature-image-new',
'post_type' => 'listing'
)
);
Related Posts:
- Remove Custom Taxonomy Metabox from Custom Post Type Screen
- How to change default position of WP meta boxes?
- Can you make a custom metabox field be required to save a new post?
- Display content from custom meta boxes in revisions
- Changing the priority of a custom taxonomy’s metabox
- Custom post type metabox array
- How to get custom metabox image field?
- Detect meta value changes when post is updated (post_updated)
- Custom field being erased after autosave
- Order custom posts by a date metabox
- How to select one major category (or custom taxonomy) for a custom post type?
- Cleanest way to code “Custom Write Panels/Meta Boxes”?
- Undefined index: at_nonce in custom post metabox
- Custom post type’s slug gets wrong when adding a custom meta box
- update a post meta from a single table cell TablePress
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- How to create a repeatable / reusable divs in the metabox?
- How to add meta boxes(repeater fields) from WordPress back end?
- Displaying Meta Box Image
- How to customize the Categories meta box to allow only one category?
- wp is not defined error using wp.media to create a custom image uploader
- Displaying custom posts only if custom meta box’s date is not expired
- Displaying Metabox value (custom post type taxonomy)
- Hide Meta Boxes for Non-Admins
- get_post_meta is returning image id
- Add TinyMCE to CPT metaboxes in 3.1?
- WordPress nl2br is not converting newline to html line break when saving metabox value
- advanced search forms with 3 input text and that the main problem 3 input text
- Create custom PAGE with register_post_type
- Using My-Meta-Box-Class plugin, how is ‘Date’ value stored?
- Send email button in custom post type backend
- What’s the difference between same wp functions get_posts(); functions in different form?
- Keep display metadata value on backend – Custom Metabox
- Populate dropdown from one custom post type inside another custom post type
- Custom Post Type with Templates using Meta Boxes?
- Why is my select meta data not saving?
- What is the best way to correlate one-to-many content-type relationships?
- Visual editor issue by having multiple tiny mce editors in a CPT
- A better way to add a meta box to custom post types
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Grouping metadatas into one
- Anon function and add_meta_box
- Create Connection Between two post types
- Add additional field to custom post_type
- Add a custom meta box for client to order CPT posts how they want
- Save Multiple Metabox values
- Use remove_meta_box conditionally on custom post type
- Create metaboxes based on custom post type
- How to Echo Metadata Value in Currency Format
- Problem with $post_id object’s property
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- populate array with posts
- Retrieving meta-box from a custom-post-type
- Create a custom post type for a photo post
- How to insert data into meta box from another plugin?
- CMB2 metabox create select with list of post from CPT
- Display metaboxes if checkbox ir marked
- Create a select metabox that the user can pupolate?
- Display custom meta on page that has been check in custom post type
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Query Custom Posts – Add To Selection
- Saving metabox keys and storing values as array
- How to sum values from all custom posts metabox
- One Custom Post Type two different Templates
- How to recover the post ID earlier in the WP admin hook action “firing” sequence?
- Publish box in CPT remove ‘edit’ link
- Saving a Custom Post Type with a Meta Box results in a “Updating Failed” error
- Adding accordion-section to custom post type edit screen
- I’m having trouble with Related Product “tax_query” ‘terms’ value
- Create Post Types from a XML url (Real Estate website)
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- wp_editor in custom post type is not saving formatted text like bold, italic etc
- Admin metabox with custom post type dropdown option not update choosed input after saving
- Add other all taxonomies as meta boxes to custom post type
- Dropdown of existing posts in a metabox
- Metaboxes in Loop
- How save custom meta type posts multicheck grouped by taxonomy (with CMB2) [closed]
- php output of generated custom metabox
- Custom meta box data not saving
- Collect custom post in a calendar
- Meta Box not being added in plugin
- Unable to get the values for metaboxes for custom post type
- Problem with ‘save_post’ hook not running
- Custom meta-box for all custom post types
- How to Arrange Support => Thumbnail
- Howto: use existing post_meta as options for a different metabox (checkboxes or list)
- Meta-Box to add multiple items one at a time and on publish save all
- WPAlchemy Metabox rewriting slug
- Custom metabox value not saving
- Displaying wp post categories into my custom metabox
- Loading one meta box only on post-new.php with a forward link
- Textarea type on one field custom add_meta_box?
- loop through custom post-type with two meta_keys
- Extending a CPT by Created by another plugin
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Adding a custom “Add Custom Field” button to Custom Meta boxes
- add a “list” into add meta box : problem
- CPT Template Option to Top
- Use a Variable in update_post_meta as the $meta_key