Simply you need to replace the_field('video')
with get_field('video')
.
Why?
Because according to ACF documentation;
get_field($field_name, $post_id, $format_value)
Returns the value of the specified field.
Whereas on the other hand
the_field($field_name, $post_id)
Displays the value of the specified field. (this is the same as “echo get_field($field_name)”)
Hope this might help others as well.
Related Posts:
- Redirect to another page using contact form 7? [closed]
- IF Custom field value equals ZERO
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- Where are custom field values stored in the database
- Advanced Custom Fields – Get custom fields from parent page
- Add custom field to the archive page?
- Matching Serialized Arrays with meta_query
- explode array within shortcode
- Change behavior of “Insert into Post” based on attachment metadata
- How to position a custom field before the editor
- Display post_object content using Advanced Custom Fields plugin
- Remove old custom field after import
- Unable to get Preview of Uploaded image within a Custom Meta box
- Add new “Insert Into Post” button with another function
- Retrieve custom fields on Categories, using WP-API
- Call a custom field in an audio shortcode?
- Order by custom field date?
- Change content before writing to database
- Order Custom post type loop by custom field (datepicker)
- wp_editor in add_meta_boxes does not show gallery
- Using Custom Function With Advanced Custom Fields
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- Problem with adding exta field in metabox in custom post type
- Custom field for default gallery
- Copying Custom Meta Values from existing post to a duplicate post
- Calculate the sum of certain the_sub_fields
- Execute/Parse Shortcode in Native WordPress Custom Field Value Field
- Displaying Custom Fields on Post with Genesis Child Theme
- Unable to show ACF’s Image Custom Field properly in Genesis Framework [closed]
- Login & Register & Custom details WITHOUT plugin
- Send Multiple Custom Field Values Through the URL
- ACF won’t load from a custom JSON location
- Show ACF fields only on certain page in the backend
- Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor
- Update posts after populating ACF field value [closed]
- How can I pass a variable set by ACF to header.php?
- WP Custom Fields Metabox Disappears – ACF plugin issue [closed]
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- ACF: How to get the full field name (meta_key) by a field key?
- Dynamically fill a post custom field with post publish date
- Audio player shortcode not showing up when using variable
- How can I store a file in the database in the same way WordPress and ACF do?
- Will loading too many ACF Fields cause slow down?
- Create WordPress shortcode with php code inside
- Display WP-Types custom fields in post [closed]
- WP_User_Query pulling ACF to loop
- how to put a custom field value in variable
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- How to add the image URL from an external RSS feed and insert into a custom field?
- Calling the “wp-link-wrap” pop-up modal
- Print custom field in Query Loop block
- Shortcode To Display Post Custom Field Value Inside Excerpt
- How to add Advenced Custom Fields In Single Post
- How to schedule a custom field value update?
- Order RSS content by an advanced custom field value
- Add new image block, set default class name and update it using Javascript
- Get an advanced custom field after post publish
- How to create a dropdown select of all items in an ACF field group
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- How to render a custom post type template with custom fields using shortcode
- Advanced Custom Fields dynamic update_field
- modify wordpress caption shortcode
- How to create a shortcode to print specific values stored in a post meta array?
- WooCommerce – Adding Custom Fields To Invoice
- Declaring in variables [closed]
- Sort custom post type by multiple custom fields
- Insert a custom field into a shortcode and use it in post(s)
- Display URL in a Custom Field
- Custom wysiwyg editor doesn’t execute shortcodes?
- Populate Javascript code with value from WordPress Custom Field?
- Custom Field 101
- shortcode in a custom metabox
- Vimeo thumbnails
- Advanced Custom Fields WYSIWYG More tag
- Can data from a Custom Field data be used by a shortcode on a per page/post basis?
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- Walker class for sub-menu with ACF fields
- How to list Category list in ACF Pro’s Select Field to choose from [closed]
- custom field (video/audio url) and embed functionality
- Get all the posts where meta field with multiple choice has several values checked
- Custom fields issue [closed]
- Querying posts by latitude and longitude to build a Google Maps with several markers
- Display MP3 as media using an URL from a custom field
- Using a custom field inside a shortocde
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- Function that replaces the image in the absence of the post meta
- How to copy data from a custom field to the post_content?
- WordPress creates new lines in postmeta table on post update
- ul list with only as many li’s as filled custom fields
- Retrive Image URL of Custom Fields in Theme
- Display custom field from the front page on another page
- How to Pass values to Custom Field through PHP in WordPress Posts?
- Enable a short code in the custom meta field
- do_shortcode close
- Including Custom fields within the_content
- Let Users Filter Posts by Custom Fields
- Filter posts by custom field (Advanced Custom Fields)
- Advanced Custom fields not available yet during publish_page action
- How can I output the custom fields wrapping with HTML