pass variable to do_shortcode()
-
Hello,
Having the hardest time trying to pass a variable (the Youtube link) to the do_shortcode() function.
$YTcode = the_field('add_video'); echo $YTcode; echo do_shortcode('[fve]'.$YTcode.'[/fve]');
the_field grabs the URL as entered in a custom field. The first echo outputs the URL as entered. The second echo does nothing.
Any hints would be lovely.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘pass variable to do_shortcode()’ is closed to new replies.