Home › Forums › JW Player 7 for WordPress › Import youtube vids, use JWplayer in theme only when metabox in admin is filled › Reply To: Import youtube vids, use JWplayer in theme only when metabox in admin is filled
Hi ilGhera,
Thanks, when i use the code below it works (it doens’t show the featured image, which is correct because the ‘_jwpp-vifeo-url-1’ is filled). Now i can’t get the shortcode to work.
<?php if (get_post_meta(get_the_ID(), ‘_jwppp-video-url-1’, true)) { ?>
How can i get the Post id IN the shortcode so the correct video is shown? I’ve tried the code below but it doesn’t show the player:
<?php echo do_shortcode(‘[jw7-video p=”. get_the_ID() .”]’); ?>
I think above code is not correct, can you tll me how to get the post id in the shortcode?
When i use the shortcode ([jw7-video p=”67127″]) in the content of the post the player is shown.
You can see a example here (it’s the post i’m testing on right now): https://edmfacts.com/releases/armin-van-buuren-garibay-need-feat-olaf-blackwood/
Hope you can help me further.
Kind regards,
Jeroen
-
This reply was modified 6 years, 11 months ago by
Jeroen.