1
任何想法爲什麼the_content filter
沒有被應用當front-page.php
文件在使用?WordPress的:front_page.php上的the_content過濾器
下面的代碼在front-page.php
正在使用時未得到執行;與index.php, page.php etc..
function some_filter_name($content){
echo "dummy text";
return $content;
}
add_filter('the_content', 'some_filter_name');
更新工作:確保你實際上是在頁面上使用
the_content()
。 the_content
過濾器僅應用於the_content
元素 - 即您必須在您的模板中使用此過濾器