1
front-page.php
파일을 사용할 때 the_content filter
이 적용되지 않는 이유는 무엇입니까?WordPress : 앞 페이지의 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');
UPDATE와 함께 작동합니다 : 당신이 실제로 페이지에
the_content()
를 사용하고 있는지 확인하십시오. the_content
필터 만 the_content
요소에 적용됩니다 - 즉, 내가 이렇게하면 적절한 훅을 호출하지 않기 때문에 전면 page.php에있을 수 있습니다 생각 템플릿