I’m trying to add the shortcode into my theme page.php file using
<?php $vid = get_post_meta( $post->ID, 'video', $single = true ); if ($vid) echo do_shortcode('[jwplayer id="'.$vid.'"]'); ?>
Under custom field I have ‘video’ and for the value the video id, 133. Instead of the video it’s printing out [jwplayer id=”133″]
I’ve tried it simply with this code as well and get the same results:
<?php echo do_shortcode('[jwplayer id="133"]');?>
Any help is much appreciated, thanks!
- The topic ‘[Plugin: JW Player Plugin for WordPress] display video with do_shortcode() php in theme files’ is closed to new replies.