Hello,
I use Wordpress 3.3.1 and JW Player Plugin for WordPress 1.5.5
Everything works fine when I'm adding videos to posts. But I'm developing a custom portfolio theme where I'm opening attachments from gallery with lightbox effect. The attachment itself loads in pup-up lightbox div and uses 'attachment.php' wordpress template. In this template I'm checking for attachment type, if it's 'image' - I'm showing IMG tag, and if it's video - I'd like to show the JW Player.
Wordpress allows to use shortcodes outside the loop in any area of template using special function:
echo do_shortcode('[jwplayer config="My Player" mediaid="128"]');
But it does not work with JW shortcode it outputs the text [jwplayer config="Prana Player" mediaid="128"] instead of parsing and executing shortcode. My other custom shortcodes are working.
In some threads on this forum I've read that [jwplayer] isn't actually a shortcode, but a filter. I've tried to figure out how to use it as a filter but failed.
Is it possible to execute this shortcode outside the Wordpress editor and how to do it?
The second option I'm thinking about is to use manual embedding. Am I diggin' in right direction? Much more code and effort but can work, I guess.
Problem solved - I manually embedded JW player. Less code, less files, no extra WP plugin calls etc. Of course, this solution is for those who have some technical knowledge but it's dead solid and working like a charm.