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