如何不在标题或页脚中显示特定内容(如字符串“ testing”),而在此处用我自己的插件查看帖子的文本。
add_action('wp', 'test');
function test() {
echo " 'test' instead of post text";
};
答案 0 :(得分:1)
add_filter( 'the_content', function( $content ) {
return 'Hello World '.$content; }, 0);
您可以以较高的优先级(较低的数字)使用the_content。