Support » Plugins and Hacks » [Plugin: Viper’s Video Quicktags] Only Preview Images shown, no Video?
7 years, 6 months ago
I am using the following code to retrieve posts and show only plugin shortcodes as videos(don’t want to show complete post and mess up):
$pattern = get_shortcode_regex();
$pattern = str_replace('(.?)', '', $pattern);
$pattern = str_replace('2', '3', $pattern);
$content = $post->post_content;
$shortcodes = preg_replace("/.*($pattern).*?/s", '$1', $content);
Now the problem is that shortcodes do get parsed but instead of loading the video, it shows only the preview image. Video is not shown. Here’s the demo: http://www.geneliaonline.in
How to fix this?
So any solution to display the video in sidebar too instead of only thumbnail?
Just drop the shortcode into a text widget.
Or do this:
<?php echo apply_filters( 'the_content', '[youtube]blah[/youtube]' ); ?>