Wordpress can';不要让短代码在小部件中工作
我有一个非常严重的问题…我正在使用骨架wordpress主题作为框架来制作一个子主题。 “我的孩子”主题除了短代码外效果很好。 如果我在页面中插入一个短代码,一切正常,但是如果我在文本小部件中插入相同的短代码,它就不工作了 我已经尝试在functions.php中插入以下代码:Wordpress can';不要让短代码在小部件中工作,wordpress,shortcode,Wordpress,Shortcode,我有一个非常严重的问题…我正在使用骨架wordpress主题作为框架来制作一个子主题。 “我的孩子”主题除了短代码外效果很好。 如果我在页面中插入一个短代码,一切正常,但是如果我在文本小部件中插入相同的短代码,它就不工作了 我已经尝试在functions.php中插入以下代码: add_filter('widget_text', 'do_shortcode'); add_filter('the_excerpt', 'do_shortcode'); add_filter('get_the_exce
add_filter('widget_text', 'do_shortcode');
add_filter('the_excerpt', 'do_shortcode');
add_filter('get_the_excerpt', 'do_shortcode');
但是没有任何改变…我也尝试直接在模板文件中插入短代码
比如:
<?php echo apply_filters('the_content',"[latest excerpt='true' thumbs='true' width='50' height='50' num='5' cat='1']"); ?>