【发布时间】:2014-03-28 22:18:00
【问题描述】:
我已经在我的博客上安装了 wordpress SEO Yoast 插件。我想避免为我的博客使用 SEO Yoast 生成的标题。有什么方法可以删除 SEO Yoast 插件为wp_title() 应用的过滤器?
我想使用页面标题作为 SEO 标题。
add_filter( 'wp_title', 'te_before_filter_wp_title' );
function te_before_filter_wp_title( $title ) {
echo $title;
//exit;
return $title;
}
add_filter( 'wp_title', 'te_after_filter_wp_title' ,9999);
function te_after_filter_wp_title( $title ) {
echo $title;
//exit;
return $title;
}
我写了这段代码来测试标题。 te_before_filter_wp_title 和 te_after_filter_wp_title 中的标题不同。所以它正在被SEO YOAST插件修改。
【问题讨论】:
标签: wordpress