question 1
Im not sure how you can do that, But you could try add the image link, and the file path as a meta_post and get the values from there, when you get the values you will only get the files/images from that post uploaded from that metabox.
You can also try custom-fields-to-attachments where you add an ID to only query the files you uploaded from that metabox.
question 2
this code could work.
<?php wp_get_attachment_image( $attachment_id, $size, $icon, $attr ); ?>
Related Posts:
- What is the index [0] for on post meta fields?
- Custom field metabox not showing in back-end
- How to hide meta box values from custom fields list?
- Create meta boxes that don’t show in custom fields
- Custom fields to save multiple values
- wp_handle_upload error “Specified file failed upload test” but still creates attachment?
- Button inside Custom Meta Box triggering the Update Button
- Why is my Custom Meta Box Field Inputs NOT saving?
- get_posts in meta box dropdown not showing latest posts
- How can you include custom post meta in search without calling each key?
- Display Custom Meta Box Field Only If Value is Present
- shortcode in a custom metabox
- Problem with saving large amount of data in postmeta/usermeta
- Move Title and the Content WYSIWYG editor position
- How to validate select field in post meta?
- How to use media upload on metabox post page without breaking TinyMCE?
- Let’s Create Custom Field Template Documentation
- How add multiple wp_editor_box to new post
- Can I save post meta programatically without setting metaboxes?
- Meta box values are displayed on Custom Fields list. Is it possible to hide them?
- If metabox has content display content
- put saved metabox values back into fields and then display on the front end
- How to improve my non-unique metadata MySQL entries?
- Set class if a meta value is set within post archive
- WordPress Blocks, setAttributes not saving
- Allow HTML in Custom Metabox area
- Custom field metabox not showing in back-end
- Save, update, get and sanitize post meta as HTML not plain
- Create Meta boxes dynamically
- Get meta value when the page is a blog archive
- Can’t save meta field value if the title not set
- Display Data From This Custom Media Upload Meta Box?
- When post is updated, custom metadata in text area field is overwritten
- wp_postmeta are updated for only one page
- When editing a post with a custom meta box the values aren’t displaying correctly
- How to add new Metadata options (Date, Author, etc.) for Posts?
- Saving multiple custom meta box fields
- Can I exclude a post by meta key using pre_get_posts function?
- Gutenberg add a custom metabox to default blocks
- So much data in postmeta
- get_post_meta() unserialize issue – returns boolean(false)
- Unable to get Preview of Uploaded image within a Custom Meta box
- How to store the value of a custom field dropdown select for post referencing?
- Detect meta value changes when post is updated (post_updated)
- Custom Meta Boxes: Store two values in one repeatable field
- Up/Down voting system for WordPress
- post meta data clearing on autosave
- Problem in custom meta boxes
- Displaying Meta Box Image
- Undefined index error when saving content on metabox
- Metabox with multiple fields added by user and upload box
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Saving custom image meta fields
- Get all meta keys assigned to a post type
- WP Custom Fields Metabox Disappears – ACF plugin issue [closed]
- Adding custom fields (post meta) before/during wp_insert_post()
- How to query posts with certain custom meta data, and output Post data
- post meta getting deleted on save
- How to add a new meta key and assign timestamp to posts
- how to fetch the meta field keys/meta boxes from a post type?
- Custom field not updating when value is empty
- Can’t get metabox value (a url) returned using WPAlchemy
- meta_compare seems to be treating values as strings instead of integers as expected
- Limit the number of acf content when displaying in post loop [closed]
- How to add custom metadata text box dropdown to sidebar in Gutenberg editor for all post types
- Show values of custom post meta on ‘Add new post’ page?
- Custom post meta field effect on the performance on the post
- Limits, not all post are showen when querying for posts by view count
- Looping inside block return
- Scripts and tags will not save or output from my custom meta box
- User customising position of WordPress Featured Image
- Using WP Color Picker in Repeatable Fields
- MetaBox not saving after empty
- How do I save Multiple fields in a meta box?
- Best way to achieve multiple links in a post title
- Show array of meta_value in Edit Post Coloum
- How to display data from custom fields I created?
- Custom Field & Gravity Forms [closed]
- custom filed from post in the side bar
- Working with multiple values and metaboxes
- Custom Meta Data is not being saved
- Move the metaboxes to the very top of post editor
- SQL query to change the value of a Custom Field
- Custom meta POST request fired twice when updating a post in Gutenberg
- add meta box considers the selected option as post parent
- Issue on Creating Checkbox Field On Custom Post type
- How do I display a custom field in an existing form on the front end?
- Add custom field information to source meta data
- Save input form on custom field
- Delete custom meta
- wordpress simple post multi rating with post_meta and user_meta
- Custom metaboxes not saving after switching themes
- I want my post to republish again after adding a custom field
- Custom fields / meta box output
- Get fields from metabox array
- Creating an If/Else statement using WPAlchemy MetaBox radio boxs
- Colecting values from custom field checkboxes and displaying them in the post
- Build Array from Input Fields question
- How can i put a custom field inside this php
- get Custom field label (select/dropdown) on front end