admin管理员组文章数量:1304019
The new version of AIOSP( v3.0 ) is altering site title forcibly and doing anything in the theme does not block it to do so ! How to prevent it from this stupid behavior ?
The new version of AIOSP( v3.0 ) is altering site title forcibly and doing anything in the theme does not block it to do so ! How to prevent it from this stupid behavior ?
Share Improve this question asked Jun 4, 2019 at 0:20 AMIBAMIB 1711 silver badge6 bronze badges1 Answer
Reset to default 0Here is the solution to completely remove it's title filter First disable "force rewrites" in "performance" Then add this code to theme "functions.php"
add_action( 'template_redirect', 'remove_aioseo_wp_title', 1 );
function remove_aioseo_wp_title() {
global $aiosp;
if( isset( $aiosp ) ) {
remove_filter( 'wp_title', array( $aiosp, 'wp_title' ), 20 );
}
}
Edit: This is the new code for v4.0
add_action( 'wp', 'remove_aioseo_wp_title', 0 );
function remove_aioseo_wp_title() {
if( ! function_exists( 'aioseo' ) ) {
return;
}
$aioseo = aioseo();
remove_action( 'wp', array( $aioseo->head, 'registerTitleHooks' ), 1000 );
}
本文标签: plugin all in one seoBlock All in One SEO from altering site title
版权声明:本文标题:plugin all in one seo - Block All in One SEO from altering site title 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741775745a2397014.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论