[wp-hackers] embed shortcode

Patrik Bóna patrik.bona at mrhead.sk
Thu Sep 16 16:57:59 UTC 2010


Did you registered your shortcode with add_shortcode()? Is it working 
when you put it in the content of post?

And btw. you can use oEmbed for including for youtube videos:

echo wp_get_oembed('http://youtube.com/video_uri', 'width=400');


Patrik


On 09/16/2010 06:41 PM, Ashish Saini wrote:
> Hi,
>
> I am trying to use this in a template :
>
> $fire = '[embed width="427"]'.$prs_spec["video"].'[/embed]';
> echo do_shortcode($fire);
>
> But it just displays the content of $fire.
>
> Even echo do_shortcode('[embed]
> http://www.youtube.com/watch?v=MuaBAe-lqdg[/embed]'); didn't work.
>
> How can I use embed shortcode anywhere on the theme?
>
> Thanks&  Regards
> Ashish Saini aka Ashfame
> (Deserve Before You Desire)
> Homepage : http://www.ashfame.com | Blog : http://blog.ashfame.com | Twitter
> : http://twitter.com/ashfame
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>    



More information about the wp-hackers mailing list