Title: Insert ACF Field Variable into Transcoder Shortcode
Last modified: January 22, 2024

---

# Insert ACF Field Variable into Transcoder Shortcode

 *  Resolved [James](https://wordpress.org/support/users/jmdesignsolutions/)
 * (@jmdesignsolutions)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/insert-acf-field-variable-into-transcoder-shortcode/)
 * I’m working on a WordPress site that uses this plugin to convert video files 
   to MP4. The site allows users to post content via an ACF form.
 * The issue I’m having is I need to pass the ID of the media file into the shortcode.
   It works fine when I manually enter the ID e.g:
 *     ```wp-block-code
       echo do_shortcode('[rt_media attachment_id= 970]');
       ```
   
 * However when I add a variable to the shortcode nothing is outputted:
 *     ```wp-block-code
       $videoid = the_field('select_video_file');
       echo do_shortcode('[rt_media attachment_id= '. $videoid .']');
       ```
   
 * I’m sure it’s got to be something really simple but I can’t workout where I’m
   going wrong!
 * Any help/advice would be greatly appreciated.
 * Thanks in advance,
 * James

Viewing 1 replies (of 1 total)

 *  Thread Starter [James](https://wordpress.org/support/users/jmdesignsolutions/)
 * (@jmdesignsolutions)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/insert-acf-field-variable-into-transcoder-shortcode/#post-17364100)
 * Found the answer elsewhere, should be using “get_field” not “the_field”!

Viewing 1 replies (of 1 total)

The topic ‘Insert ACF Field Variable into Transcoder Shortcode’ is closed to new
replies.

 * ![](https://ps.w.org/transcoder/assets/icon-256x256.jpg?rev=3276537)
 * [Transcoder](https://wordpress.org/plugins/transcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/transcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/transcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/transcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/transcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/transcoder/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [James](https://wordpress.org/support/users/jmdesignsolutions/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/insert-acf-field-variable-into-transcoder-shortcode/#post-17364100)
 * Status: resolved