我想你想修改<title>
标签
在函数中添加此项。php
add_filter(\'wp_title\', \'my_custom_page_title\');
function my_custom_page_title($title) {
global $s;
if( isset($_REQUEST[\'author_name\']) && is_search() ) {
$title = \'Search Results for \'.$s.\' from author \'.$_REQUEST[\'author_name\'];
}
return $title;
}
如果
$s
返回空白替换为
$_REQUEST[\'s\']