2017-06-29 35 views
0

我想添加一個短代碼到我的主題,這是從一個名爲shortcoder的插件生成的。插件生成的短代碼是[sc name="shop-beauty-all"],此短代碼不起作用<?php echo do_shortcode("[sc name="shop-beauty-all"]"); ?>。有沒有人有任何解決方案,我怎麼能得到這個工作?如何添加短代碼到主題

[sc name="shop-beauty-all"]

+0

語法錯誤的,則使用此 Arun

回答

0

嘗試使用:

echo apply_filters('the_content',' [sc name="shop-beauty-all"] '); 

代替do_shortcode,並看看是否有幫助。 ?

1

嘗試此<?php echo do_shortcode("[sc name='shop-beauty-all']"); ?> insted的<?php echo do_shortcode("[sc name="shop-beauty-all"]"); ?>