At some point in the process you could do the following:
- Generate attachment ID from URL, like here
- Save attachment ID to custom field value using add_post_meta()
- Retrieve attachment using custom field value later with get_post_meta()
Related Posts:
- Getting the ID of any image for use in functions.php
- Remove Dimension from wp_get_attachment_image
- explode array within shortcode
- How can I append custom data to images in the editor?
- How can I remove fields in the attachment editor?
- Saving Custom Field in Attachment Window in WordPress 3.5
- Add multiple images to a page sidebar
- How to set a default meta value for custom field
- Add custom field to image editor
- How to save custom fields for attachments
- Display info from custom fields in all images’ HTML
- get_post_meta fields don’t show up on posts page
- copy attachments to another post type and change attachment url
- ajax delete value from custom field array
- Save attachment custom fields on front end
- Get a post_id where meta_value equals something in a serialized meta_value field
- Insert attachment ID in custom field from media uploader
- How can I store a file in the database in the same way WordPress and ACF do?
- Validate data on attachment_fields_to_save
- How do i save and retrieve custom attachment meta?
- Custom field not updating when value is empty
- how to upload a image from frontend with wp_insert_post and also update_post_meta?
- Link FROM attachment to full post and get custom fields values on attachment page?
- Attach images to posts using custom fields (just paths to images already uploaded)
- Show custom field on attachment page?
- How To Show Get Adjacent Posts If Posts Are Sorted By Custom Field
- How to get custom image field of specific post id
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- Custom field in media library not saving, selected() function not adding “selected” to select list input type
- How to delete attachments associated with custom field type when post property changes? [closed]
- Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete
- Adding thumbnails for non-image attachments
- Get custom field from page, in a post?
- How can I attach files without using a plugin?
- Custom post meta field effect on the performance on the post
- Difference between meta keys with _ and without _ [duplicate]
- Orderby meta_value only returns posts that have existing meta_key
- Can I query custom meta data through WP_Query
- Add custom objects/entities to WordPress
- Change behavior of “Insert into Post” based on attachment metadata
- How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?
- Is there a way to do multiple ordering on a multiple meta_query?
- searching in custom meta field
- How to add upload field in a custom taxonomy?
- Store JSON in a custom field
- Custom contact form 7 select with custom values [closed]
- Best way to add custom / magic / flutter fields into RSS feed
- Setting orderby to a custom field using pre_get_posts
- How to get multiple checkboxes in one meta field
- Adding Custom Fields to Search
- post_author for wp_insert_attachment
- How to Display Custom Meta Box only on Specific Page IDs
- Get custom field label
- Show ACF fields only on certain page in the backend
- Custom Field Suite A little problem
- How make a custom search on backend in WordPress without plugin?
- Create Multiple File Upload Metabox in WordPress
- get_posts that haven’t been assigned a specific custom field
- How to add the image URL from an external RSS feed and insert into a custom field?
- My custom backend codes shows up when i try to view my website
- Advanced Custom Fields dynamic update_field
- Custom Profile Fields move from BBpress to BuddyPress
- I need a “Choose from existing content” popin
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- Avoiding ACF get_field and returning to core WordPress function
- Display custom field value part by part?
- How can I hide custom field from users used for caching response from external api?
- Cannot save underscore custom fields in one wordpress installation using xmlrpc and underscores
- Diamond question mark in text after migrating content
- Display posts with empty custom field
- Plugin or shortcode for ISBN number?
- HM CMB: Role Select
- Display latest post depending on Meta Box content
- WP-eComerce Advance Meta Tag data in descending order [closed]
- Custom fields won’t update
- Replacing custom field with shortcode
- WPAlchemy issue when using 2 select menus with the same values inside a repeating group
- show a specific metabox dependent on the page template
- excluding posts by an ACF field in pagination
- Search & column order by meta value in admin
- Is the use of many custom field not good for server?
- How can I ‘check’ the “custom fields” box from the Screen Options?
- Very large list of options for BuddyPress profile fields
- Can you generate a featured image from two images from custom fields?
- How to get all wp_posts in wordpress fetched from database
- Search fails when using the radio buttons
- Change Order of Sections Using Custom Fields
- Order a query by meta_value and then by post_date
- custom field functionality
- Syling Custom Fields echo’s from from functions.php
- Decouple page name from page title
- Custom Field add markup to line breaks
- Use Metabox to enter Post Title
- Include custom fields into the content of a regular page
- Bypassing a Form Options
- How to implement jquery-ui autocomplete into custom fields?
- i want to send email on custom post field (job_status == 2) but it is not working
- How to create a searchable database with a single-field search box at the front end? [closed]
- Multiple triggers when publishing, saving or updating a post in WordPress
- If possible a field ID transfom in a Custom Field?