2013-06-27 65 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

相關問題