1
我试图创建一个额外的简码内的格式显示the_content
返回the_content()与简码
function custom_recipe_content($atts){
if (! is_singular('recipe')) {
return;
}
return the_content();
}
add_shortcode('recipe_content', 'custom_recipe_content');
当我加入WP文本构件内[recipe_content]
简码,它的小部件,而不是上面添加在小部件内部。
任何帮助,非常感谢。
即使不工作。内容正在返回就好。我认为问题在于使用文本小部件“echo”中的代码。 – kiarashi