How to use do_shortcode for td_block_video_youtube

Posted in: Newspaper
Post count: 22

I have tried several different methods to use the shortcode td_block_video_youtube in my custom php template. what do I need to do in order to utilize that shortcode?

Thanks

Post count: 22421

Hello,

Well as we have no idea what your custom php template looks like, we cannot make a suggestion. Please provide more details to your custom template and how you want to implement the youtube video.

Thank you!

Post count: 22

So I created a new single_template based on the single_template_2.php file and the loop-single-2.php.

I am able to get it working. Basically I am trying to get a static do_shortcode(‘[ td_block_video_youtube playlist_title=”My YouYube Playlist” playlist_yt=”8hAwUt8-G34, F9S49fUqbVQ, TUdVeZ1pbuc” playlist_auto_play=”0″ ]’) with the shortcode directly under where the content is echo.

Jumping down to the get_content portion of the loop this is my code:
<?php echo $td_mod_single->get_content();
$vidarray['playlist_title'] = $td_mod_single->post->post_title;
$vidarray['playlist_yt'] = 'lxYtiIHcpVg, 5pVxWdnInWY, 2zUANqLVbhM, Q0R_K3QSb6o, 2yCfV9qL42k';
$vidarray['playlist_auto_play'] = 0;

videoSC = '[vc_row][vc_column][td_block_video_youtube playlist_title="TITLE" playlist_yt="'.$vidarray['playlist_yt'].'" playlist_auto_play="0"][/vc_column][/vc_row]';
echo do_shortcode($videoSC);
?>

Post count: 22421

Hello,

The video playlist does not show up when added with do_shortcode. A normal video player does. We will look into this and do some tests. I will add this issue on our list of fixes and updates. Until then you can use the visual editor to add a video playlists: http://screencast.com/t/e4eQwwhn8

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.