admin管理员组文章数量:1122832
in polylang there is an integration file for yoast named wpseo.php that adds some translated urls to yoast sitemap, I don't want these urls since I'm doing a custom work on translations with my own classes, the filter is this
/**
* Add filters before the sitemap is evaluated and outputted.
*
* @since 2.6
*
* @param WP_Query $query Instance of WP_Query being filtered.
*/
public function before_sitemap( $query ) {
$type = $query->get( 'sitemap' );
// Add the post post type archives in all languages to the sitemap
// Add the homepages for all languages to the sitemap when the front page displays posts
if ( $type && pll_is_translated_post_type( $type ) && ( 'post' !== $type || ! get_option( 'page_on_front' ) ) ) {
add_filter( "wpseo_sitemap_{$type}_content", array( $this, 'add_post_type_archive' ) );
}
}
How can I remove this filter though my functions.php file?
本文标签: Remove wpseo filter from polylang plugin
版权声明:本文标题:Remove wpseo filter from polylang plugin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304796a1932359.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论