Use get_post_meta();
in your template to get that metadata attached to that image.
<div class="img-holder">
<img src="https://dummyimage.com/300x200/bada55/0011ff&text=300x200" alt="">
<p class="img-number"><?php echo get_post_meta($post->ID, '_image_number', true) ?></p>
</div>
Related Posts:
- Saving Custom Field in Attachment Window in WordPress 3.5
- Save attachment custom fields on front end
- Custom field in media library not saving, selected() function not adding “selected” to select list input type
- Adding thumbnails for non-image attachments
- Remove Dimension from wp_get_attachment_image
- explode array within shortcode
- How can I remove fields in the attachment editor?
- Add custom field to media attachment image attribute in post editor
- 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
- copy attachments to another post type and change attachment url
- ajax delete value from custom field array
- 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?
- Getting the ID of any image for use in functions.php
- 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?
- Can’t display errors in attachment_fields_to_save
- $form_fields from attachment_fields_to_edit returning empty array
- 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?
- Save attachment ID instead of URL in custom field
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- How to delete attachments associated with custom field type when post property changes? [closed]
- Adding fields to attachment – only shows when inserting new attachments
- Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete
- Custom classes for attachments
- How can I attach files without using a plugin?
- How to add a custom field in the advanced menu properties?
- Underscores in custom fields
- Sortable Custom Columns in User Panel (users.php)?
- Add custom fields when specific templates are selected
- Save custom user meta on registration
- Using media-upload.php to upload mp3 via custom fields
- Meta keywords and descriptions plugin for manually editing meta for each page/post
- How to add/save Custom Field in user settings/profile “Checkbox list”
- How to add dynamically the main parent pages’s custom fields and their values to all sub-pages?
- How to use query_posts() with a date filter on a custom field?
- Login & Register & Custom details WITHOUT plugin
- Compare WP Custom Field date
- Deleted pages showing up when querying for child pages
- Ordering posts by date custom field
- Sorting WordPress Posts via Custom Field Values?
- Custom field as meta description
- post meta getting deleted on save
- Auto Populate Custom Field with Complex Value That Increase by One?
- Display custom field if it exists and has a specific value [closed]
- Checkboxes in registration form
- WordPress: custom field display twice
- meta_compare seems to be treating values as strings instead of integers as expected
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- How to add fetchpriority parameter to images in the media library?
- Calling the “wp-link-wrap” pop-up modal
- Editable custom field in WP Admin Dashboard
- Customizing user data
- displaying and sorting comments by a custom field (using PODS plugin) [closed]
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Custom tables or custom fields?
- Show user info in a hovercard [closed]
- edit_tag_form_fields is depricated but tag_edit_form_fields doesn’t work
- Iterate through users and display users meta info at front-page
- Getting the Featured image URL and inserting it as Custom Field on Post update / publish
- Adding custom field and querying from post table
- How to display a product features dynamically with icons?
- Update custom field values on edit address page woocommerce
- Is there a (sane) way to get all custom fields for a post, which do not have a leading underscore?
- Custom field image to Featured Image
- Show array of meta_value in Edit Post Coloum
- custom filed from post in the side bar
- Working with multiple values and metaboxes
- Unable to select image with custom field
- How to automatically change a posts status to draft based on custom field
- Rewrite comment form post ID on submit
- Move the metaboxes to the very top of post editor
- WordPress Rest API custom field not updating till i manually update the post
- search based on custom field
- Why isn’t update_post_meta saving?
- Custom fields multiple commas separated values
- Display taxonomy loop using custom field data
- Add custom field information to source meta data
- Change blog post title on main blog page
- Spit out list of distinct instances of custom field?
- How to save array option as text and not integer?
- Delete custom meta
- Filter and display a specific custom field value [closed]
- Custom fields are not displaying in page with multiple loops
- Add class from custom field into widget class
- Get multiple posts with some custom fields efficient
- Adding custom field to Lightbox in header only pulls current page data, not Lightbox item data
- Meta boxes not displayed, data isn’t being saved
- Custom fields / meta box output
- Get single image from custom fields made with WCK custom fields creator
- Media Custom Fields – get a value with PHP
- How to add google map to custom field