From your array, you should get the Media ID of the videos. If you have the media ID, it will be as listed below:
// Let's say you have the media ID
$meta = filesize( get_attached_file( $attachment_id ) );
By using the size format function you can list the size
echo size_format($meta);
Update according to your updated case scenario:
$custom_field_value="8785,8786,8787"; //If your custom field contains the IDs like this, simply replace my text with the custom field
if (!empty($custom_field_value)) {
$media_ids = explode(',', $custom_field_value);
if ($media_ids) {
echo '<ul>';
foreach ($media_ids as $media_id) {
$file_size = size_format(filesize( get_attached_file( $media_id ) ));
echo '<li>'.get_the_title($media_id).' - '.$file_size.'</li>';
}
echo '</ul>';
}
}
Results:
Related Posts:
- Videos Post Type with Custom Filters
- Custom Post Types vs. Advanced Custom Fields (with Repeater Field add-on)
- Multiple Frontend Filters Using Advanced Custom Fields
- Integrate Custom Post Type Events into Calendar
- Specific routing for CPT
- Order post by date with ACF
- Displaying custom field according to date
- How to set the seo title tag on a page by page basis?
- WebP Fallback for Inline Background Image in Style Attribute
- Adavnced custom fields relationship query plus query inside
- Query based on custom fields start and end date
- How do you get the full size url of an attachment image
- Redirect to another page using contact form 7? [closed]
- How To Import CPT With Only Few TEXT ACF Fields From Front End?
- Advanced custom field boolean value in custom post type
- Why is my WP Query not returning first result’s post meta?
- Custom Post Types — $args vs. labels array
- How to add/edit advanced custom fields on custom post type’s WordPress REST API?
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- Querying & displaying custom post type into an existent page [closed]
- Get an array wich contains the post_name of every post that has the custom post_type “pelicula”
- Add first letter of titles to array, then compare arrays
- How to get a custom type post data when it has a connection with another custom type post?
- Add post meta programmatically to attachment
- Custom post type showing same Post on all Pages
- Why would social icon badges disappear after adding a custom post type?
- Sort a custom post with ACF: Date Picker & Display Featured!
- Query Custom Post Types with checkboxes
- ACF repeater field usage
- List of users that clicked a ‘Join’ button at single post
- Create Array from custom post type to display a slider
- Post loop count is not in order
- How to create a multidimensional array with multiple loops
- Show list of custom posts with respective attachments?
- Inefficient Query Confusion
- Querying multiple values from a single key
- Check if user has comment on current post
- How to inherit field value from parent post into in child / sub post
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- Custom Post Type page sorts differently on different environments
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- set_query_params using custom params defined in functions file?
- Custome fields not displayed
- Create short URL with auto 301 redirect
- ACF for custom post type archive pages: which hook to use?
- How to define the template for custom posts?
- Batch Extract Date from post title and put into ACF custom field
- How do I add html content to custom post type Posts using php?
- Query entries from custom post type in an ACF flexible content field
- Why is wp api returning old acf values?
- How to use single.php for creating, reading and editing Custom Posts with ACF
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- Distribute Custom Post in different pages
- get custom post type value in header.php [closed]
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Advanced custom fields Post Object image field not displaying in custom post type single.php
- Sum and count of custom field values
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- How to export custom post type with ACF to individual file with automation?
- How do I disply an array inside a custom post type?
- Custom fields not showing in custom post type
- Group by custom field value (start and end times)
- Custom post types, disable fields
- meta query not retrieving posts
- Custom Post Type Field Array parsing [closed]
- Custom Post Type with Configurable Sidebar via ACF
- Getting custom post types to properly display alphabetically
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- Looking to Customize YouTube Video Embeds
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- ACF Relationship Posts how to show additional content
- wp-includes does not contain a feed template
- Let users upload image(s) to the post from front end
- Using WP meta query to show custom post types by a start and finish date
- Limit search field to just search a custom post type with custom fields
- Advanced custom field – posted fields from custom post type
- Excerpt length: get first paragraph
- How do I add multiple post types to this query?
- SQL query – get ids – Advanced Custom Fields / WPeC
- Custom field with Types: get custom field’s value label (of type select)
- Why doesnt my tag page populate with this custom post type?
- How to display author details in a custom post type in the wordpress backend?
- Show posts associated with ACF post object and custom post type
- How can I loop at a Specific Taxonomy from a custom post type?
- Update value inside array update_post_meta
- Show/hide posts and categories based on user meta
- Fetch data from two custom post types and create multidimensional array for output to html table
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How can i show ACF in post excerpts
- ACF – Retrieve custom taxonomy from a relationship field
- How to set a ‘page’ as parent of a custom post type?
- Custom archive page for custom taxonomy and pagination issue
- Custom front-end form for adding post – Category problem
- Set up a WP Cron scheduled event to update calculated ACF field
- Query filter by value in meta_value array
- Show Post Revisions on front-end
- count & sum the value of custom field of the author post in dynamic posts
- How to show Custom Post Type – Case Study using Shortcode & ACF