我使用add_filter(the_content,'func')
将[一些单词]添加到内容中。
当the_content()
运行时,[一些单词]没有显示在内容中。
但是,如果在调用the_content()
之前echo
或vad_dump
某些内容,将显示[一些单词]。
func($content) {
return $content.'[some words]';
}
试试这个
add_filter('the_content','func');
function func(){
return $content.'[some words]';
}
您忘了在the_content
的开头和结尾添加'
。