Rispondi a: Import youtube vids, use JWplayer in theme only when metabox in admin is filled

Home Forum JW Player 7 for WordPress Import youtube vids, use JWplayer in theme only when metabox in admin is filled Rispondi a: Import youtube vids, use JWplayer in theme only when metabox in admin is filled

#1920
Jeroen
Partecipante

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

  • Questa risposta è stata modificata 7 anni, 1 mese fa da Jeroen.