categories - Remove WP Core canonical for category pagination

It seems that WP is adding a canonical to the root of my pagination, and no indexing all other pages on Category pages.F

It seems that WP is adding a canonical to the root of my pagination, and no indexing all other pages on Category pages.

For example, /locations/residential/?_page=2 is no-index, and gives /locations/residential/ as canonical.

I have tried this to attempt to remove this for these Category pages, but Screaming Frog still says the pagination is no-index and rel=canonical to the root page.

add_filter( 'redirect_canonical','custom_disable_redirect_canonical' ); 
function custom_disable_redirect_canonical( $redirect_url ){
    if ( is_category() ) $redirect_url = false;
    return $redirect_url;
}

Any idea what I amdoing wrong?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744562586a4580967.html

相关推荐

  • categories - Remove WP Core canonical for category pagination

    It seems that WP is adding a canonical to the root of my pagination, and no indexing all other pages on Category pages.F

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信