我正在使用wpseo\\u标题过滤器重写我网站中的作者页面标题。
我在作者中有以下代码。php模板:
<?php
global $author_page_titles;
$author_page_titles = $curauth->nickname .\', Preparador de Oposiciones a \'. $term_especialidad->name .\' en \'. $term_region->name;
?>
哪些输出Kevin, Preparador de Oposiciones a Forestales en Madrid 在我的作者页面中(在其他页面中是给定的作者昵称和他/她选择的术语)。在我的功能中。php I具有以下功能:
function my_custom_authorpage_title($author_page_titles) {
if (is_author()) {
global $author_page_titles;
return $author_page_titles;
}
}
add_filter(\'wpseo_title\', \'my_custom_authorpage_title\', 100);
我很确定错误一定出在如何以及在何处声明var,但找不到解决方案。