最近我安装了wordpress Themeforest VideoTube主题。但是当我使用codecanyon Social Locker插件时,则面临这个问题。我的wordpress主题仅支持do_shortcode
我的简短代码是......
auto test = std::bind(&SomeClass::test_function, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
test(a, b, c);
我希望将此代码放在我的短代码的中间位置。
[sociallocker id="2378"] [/sociallocker]
请帮助我......我怎么能这样做?我在wordpress主题functions.php文件中设置了什么查询?
答案 0 :(得分:0)
你可以像这样使用do_shortcode,
$text_to_be_wrapped_in_shortcode = '<div class="player player-small <?php print apply_filters( 'aspect_ratio' , 'embed-responsive embed-responsive-16by9');?>">';
echo do_shortcode( '[sociallocker id="2378"]' . $text_to_be_wrapped_in_shortcode . '[/sociallocker]' );
答案 1 :(得分:0)
这应该有效,
$text_to_be_wrapped = "<div class='player player-small ".apply_filters( 'aspect_ratio' , 'embed-responsive embed-responsive-16by9')."'";
echo do_shortcode( '[sociallocker id="2378"]' . $text_to_be_wrapped . '[/sociallocker]' );