do you have a custom meta field associated with the image? if so place this in your functions.php:
<?php
$trim_length = 21; //desired length of text to display
$custom_field = 'your custom field key here';
$value = get_post_meta($post->ID, $custom_field, true);
if ($value) {
echo '<p>I want to use: ' . rtrim(substr($value,0,$trim_length)) . '...</p>';
}
?>
this will limit the character count in any meta field just place your meta key in $custom_field=”;
hope this helps cheers.
Related Posts:
- Set a maximum upload count for users on a specific user role
- How to get all files inserted (but not attached) to a post
- Password protect some uploaded files, so only logged-in users can view them
- Images not being generated at correct size
- Use the WP media uploader dialog for uploading a form attachment (non-admin). Offering progress and drag and drop feedback
- What is the way to add additional fields to attachments in 3.5+?
- How does WordPress decides how many sizes of an image to create?
- Insert attachments from custom uploader into post (regular uploader style)
- Do custom post type (CPT) attachments/media store the parent post ID?
- Adding attachment custom field metadata to TinyMCE tag
- Check if author or uploader id of the attachment(uploaded) image is match?
- controlling whether upload is attached to post or not
- Can’t upload files 1MB+ [closed]
- How to properly move media files and update data?
- How does WP media uploader create the 3 different sized images, and how can I duplicate it
- what happens to existing media files when I switch to year/month directory structure format?
- Can’t upload media, permissions are correct
- Decrease file size upload in Media
- Display attachments by ID in a wp.media frame
- Image upload callback in new 3.5 media
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- Where do the favicons for Media Files come from
- Uploading Multiple Attachments From Front-End With A Description
- How to manage a standalone media folder?
- Saving images from Gravity Forms repeatable File Upload as post attachments [closed]
- How do I link directly to uploaded files?
- Is it possible to trigger some JavaScript when Media Popup is opened?
- Is wp_read_audio_metadata() function deprecated?
- There’s a way to scale media (images) at 50%?
- Multisite, upload images directly to Amazon S3
- Media Uploader: get deleted files
- WordPress REST Upload Media
- Force wordpress to see uploads folder media
- How to validate the file name of the Media File Uploads?
- Disable TinyMCE Drag and Drop
- Post Specific Uploader
- Setting wp_temp_dir and permissions not working for “Missing A Temporary Folder” error
- Select image sizes you want to be uploaded
- Check if image exists before uploading with media_sideload_image()
- Media upload via backend doen’t work after moving site
- Setting higher upload limit
- Media handle sideload not working
- How to overwrite wp_unique_filename logic
- How to change upload directory based on frontend form input name or ID?
- How do I get allowed Media Library upload file extension list?
- Cannot upload .mp3 file to wordpress media
- Uploading dwg files to wordpress
- How to manage a big collection of files with wordpress?
- WordPress suddenly starts uploading media to an old (backdated) folder
- Switch between tabs on “Insert Media” dialog
- Can I change the URL of a video, or upload a video to a specific URL?
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- Using wp_enqueue_media() with switch_to_blog() issue
- making media URL secured
- WordPress Media Library – Upload space used
- How to allow logged out users to upload media?
- Is it safe to allow non-admin users access to media uploader
- PHP error when trying to upload .mp3 files via Media Library [closed]
- Get images attached to a specific page
- Is it possible to import all files from a uploads DIR into WP media, retaining paths to the files
- Flat media folder vs multiple directories
- Move media files from the root to date folder structure
- Big file upload give HTTP error
- Can you limit the size of media files being uploaded not using php.ini?
- Image upload to media library fails. Folder won’t create, database insert fail, XAMPP Windows
- Send media uploads to different directories
- Open Media Uploader Link in single post or page
- How to change archieve frequency of the media file in uploads folder for wordpress blog
- How to limit sizes for specific upload programmatically?
- Uploaded images result in a file url with full path on disk appended
- Using WP-CLI “wp media import” to sync files to the media library
- Import media (.xml) does not attribute featured images to posts
- Blog suddenly can’t display .jpg
- MIME type not supporting HEIC support type in WordPress
- SVG not displaying in Media Tab in Backend
- Modify Maximum upload file size text in WordPress Media
- Replicate Media Galley Edit view in Add Media View
- Front-End Upload media with category
- How to manually set an attachment in a post?
- Sanitizing existing media library paths and page links from foreign characters
- Issue with upload.php with media
- Media files not loading
- Set default “Link CSS Class” in add media admin editor
- media_sideload_image results in http error (500)
- How could you allow users to upload a video in within their profile and display it on a wordpress site?
- How to share media between independent blogs?
- media_handle_upload on mix form fields (not required file input)
- WP Capabilities to Add Media, Use Media, But Not Edit Them
- Is there a way to limit multi upload in media upload box?
- How to split my uploaded media into directories?
- All files unattached in Media Library
- Attachment Metadata not updated while uploading audio files
- Media Gallery doesn’t show (using WP-Read Only)
- Upload User Avatar from android to WordPress using Rest API
- I am facing problem in loading and downloading Mp3 files
- How to disable direct media file access in nginx or ubuntu for non loggedin users?
- Updating Media Library PDF’s in bulk
- Does WordPress import export tool keeps the file hosted on the old website?