我需要使用插件更改或删除wordpress中的 <title>
标记
例如 <title> My old title </title>
=> <title> New title </title>
我试试看
function plugin_title($content){
$content=str_replace('My old title','New title',$content);
return $content;
}
add_filter('wp_head','plugin_title');
//但它不起作用 . 任何的想法 ?
1 回答
尝试使用wp_title钩子