• Resolved James

    (@jmdesignsolutions)


    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:

    echo do_shortcode('[rt_media attachment_id= 970]');
    

    However when I add a variable to the shortcode nothing is outputted:

    $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

    (@jmdesignsolutions)

    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.