Advanced Custom Fields Shortcode
-
I’m trying to build a template that plays a youtube playlist a user enters by having a advanced custom field to store the playlist url and then using this:
<?php
$youtube_playlist = the_field(‘youtube-playlist’);
$shortcode = ‘[embedyt]’ . $youtube_playlist . ‘[/embedyt]’;
echo do_shortcode($shortcode);
?>
but it is just outputting the url of the playlist, where am I going wrong?Thanks for any and all pointers!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Advanced Custom Fields Shortcode’ is closed to new replies.