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.

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?

Topic rel-canonical noindex permalinks categories pagination Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.