开发者

WordPress: do_shortcode doesn't work well

开发者 https://www.devze.com 2023-03-03 04:33 出处:网络
I am working on a wordpress site, and I have downloaded a plugin called stream video player, which has a shortcode. If I put the shortcode into the content editor, it works well and it displays开发者_

I am working on a wordpress site, and I have downloaded a plugin called stream video player, which has a shortcode. If I put the shortcode into the content editor, it works well and it displays开发者_Python百科 the video, but if, inside a template I am creating, I call it through "do_shortcode" function, it doesn't work, it just shows the text [stream bla bla]. Can anyone help me and tell me why this is happening?


I have been answered with the following, and it works!

It is not really a shortcode, it is a content filter but you can try calling the plugin's function directly

if( function_exists('StreamVideo_Parse_content') )
{
    echo StreamVideo_Parse_content("[stream bla bla /]");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消