1

I would like to something simular solution like is_home() for videos. If the post has video content, the php script write out the og video url (start with https of course).
In my example I imagine like this way (I know this not working, this just a example):

<?php if ( has_video_content() ) {?>
<meta property="og:video" content="https://www.neocsatblog.info/jwplayer/player.swf?file=THE_VIDEO_ENCODED_URL&autostart=true">
<? } ?>

The video is a mp4 file (uploaded to the gallery), not a embed media (Yes I use short code for the media, the [video] shortcode is good for me.). Is that possible somehow?

  • How does your post "have video"? Is it an oEmbed from YouTube, Vimeo, TED, etc.? Or is it uploaded to your uploads folder and you are using the [video] embed? Please read How to Ask and edit your question with the necessary info. – kaiser Nov 26 '15 at 13:07
  • I updated my post, I hope now is clear :) – InBug Nov 26 '15 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.