Hi Philljc;
This should work;
if(function_exists('lyte_parse')) { echo lyte_parse($video); }
frank
If I use:
<?php if(function_exists(‘lyte_parse’)) { echo lyte_parse($videoId); } ?>
It just shows the video ID on the page 🙁
Yeah, sorry about that; I based my answer on feedback I received a long time ago, but the plugin evolved in the mean time and that doesn’t work any more.
You’ll need to put something like this in your functions.php;
function lyte_preparse($videoId) {
return lyte_parse('httpv://www.youtube.com/watch?v='.$videoId);
}
and then indeed call lyte_preparse instead of lyte_parse.
hope this helps,
frank
That did it, thanks!
May I ask why you’re using widths for the players, and why there isn’t a 100% width? If there is I apologise, I wasn’t able to find it.
When I used the following (in conjunction with a container), it worked perfectly in my responsive layout for desktop/iPad/iPhone:
.fourthree .lyte, .lyte {
position: inherit !important;
}
Thanks
well, the fixed widths in the admin screen are in reality max-widths. if the video doesn’t fit, it’ll automatically resize to 100% of the available width 🙂
Hi Philljc;
I’m working on a new version of my plugin which will have the lyte_preparse function by default and which features an API as well.
In case you guys want to test it, you can download the development version from http://downloads.wordpress.org/plugin/wp-youtube-lyte.zip
Looking forward to your feedback! 🙂
frank