WordPress Subcategory Creates 2 urls for same page (serious issue)
This can get a bit demanding to get it right so this following snippet should provide the basic upon which you can research and build a more complete solution: add_action( ‘template_redirect’, function() { if ( is_category() ) { $term = get_queried_object(); if ( isset( $term->parent ) && $term->parent ) { global $wp; $request_url = trailingslashit( … Read more