2013-06-27 23 views

回答

0

您是否尝试使用do_shortcode函数在Template中使用shortcode。

所以,假设你的短代码是[cvg-gallery galleryId='gallery-id'],那么用do_shotcode包装它。像

// Use shortcode in a PHP file (outside the post editor). 
echo do_shortcode('[cvg-gallery galleryId='gallery-id']'); 

然后在模板或灯箱中使用它。

+0

是的,如果我写 [cvg-gallery galleryId ='gallery-id'] 在页面中的内容中,它是可以的,但是如果我在模型页面中编写do_shortcode(...)字符串(简码的字符串)? – user2527861

相关问题