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
- Getting custom taxonomy from custom post type
- Filter next_post_link() and previous_post_link() by meta_key?
- get attachments for all posts of particular post type
- Automatically fill custom field value on post publish/update
- Limit the post for differents custom post type in the same wp_query
- array_pop() expects array, boolean given for $event_type_term ->slug
- Make permalinks based on an ACF-field
- How to sort a table of custom posts by column containing custom field
- List events by month
- Use Custom Post Type as Custom Field
- Do attachments added to custom post types have a post parent?
- Save custom post type in different table
- Pull image from ACF field in a Custom Post Type
- Archive filter disappears on no results?
- WordPress custom post type archive with description
- wp_update_post based function works on existing posts, but not new posts
- Impossible to get Attachments Outside WordPress?
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- How to replace custom post type slug with an ACF value?
- Link users to a custom post type
- Create a post in custom post type using field in registration form after users submit form
- Save an array from drop-down in custom meta box
- Disable featured image
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Validate custom fields before save using WordPress Rest API
- How can I dynamically add a post to a custom post type which uses a custom field?
- Problem with WordPress query on page using custom fields
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- custom post type WYSIWG removes paragraphs when displayed
- ACF From & To Date Validations
- Custom Post Type Video – Online/Offline
- Exclude objects from WordPress API based from ACF field using rest_prepare_{$post_type}
- CPT archive admin menu label
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Order Custom Post Type by Custom Field Value
- Display post content with respect to its title?
- Hierarchy and access control for Custom Post Types (CPT)
- Searching Custom Post Types
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- How to update post meta on uploaded image from a custom form?
- Order post by date with ACF
- Adavnced custom fields relationship query plus query inside
- How do you get the full size url of an attachment image
- Querying & displaying custom post type into an existent page [closed]
- Custom post type showing same Post on all Pages
- Post loop count is not in order
- How to create a multidimensional array with multiple loops
- Inefficient Query Confusion
- Querying multiple values from a single key
- How to inherit field value from parent post into in child / sub post
- How to use single.php for creating, reading and editing Custom Posts with ACF
- posttype and custom fields on multisite
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- Custom fields not showing in custom post type
- meta query not retrieving posts
- Using WP meta query to show custom post types by a start and finish date
- Advanced custom field – posted fields from custom post type
- How to display author details in a custom post type in the wordpress backend?
- Show/hide posts and categories based on user meta
- ACF – Retrieve custom taxonomy from a relationship field
- Custom front-end form for adding post – Category problem
- Set up a WP Cron scheduled event to update calculated ACF field
- Show Post Revisions on front-end
- How to show Custom Post Type – Case Study using Shortcode & ACF
- Add custom post related by custom field to custom post
- Create loop from selected terms in ACF taxonomy field
- Sort custom posts by date and then by taxonomy
- How to add a default predefined thumbnail when creating a brand new post?
- Show custom post type event if current day using ACF
- Issue to display Permalink (ACF Relationships in Custom Post Type )
- Filter posts by their related field’s custom field
- If ACF Post Object post has custom taxonomy term…
- Changing default admin column sorting to an ACF Date Picker field
- Taxonomy shows up twice on Custom Post Type
- Create 3 Levels of relations with WordPress
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- Linking posts together with Advanced Custom Fields “both ways”
- save_post affect creation and deletion
- If custom taxonomy exist on post?
- How can I save a Custom Post Title and Slug with a Custom Field?
- Custom Field as Custom Post type element class
- Extracting Post ID and passing through as an attribute in a shortcode
- CPT and metabox: create multi checkbox by using array?
- Pulling in Related Posts based on Post Type array
- How to query posts by meta keys AND under specific category?
- how to load custom single.php?
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Function that get ACF fields value before saving
- Custom Post Type Author Array Problem
- Custom post type adding additional markup
- Advanced Custom Fields: query posts filtered by multiple field values
- Custom Post-type not returning the right child_of
- Register a title automatically with a relationship field
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- post__in select all custom posts and not the selected array of ids