Redirect Custom Post Type from Child Taxonomies

admin2025-06-03  4

I have created a Custom Post type and its own respective taxonomy.

I have for example this URL structure: /

The same content can also be accessible through this link: /

How can I write a rewrite so the second URL is not available especially for google SEO perspective and avoid duplicate content

I have created a Custom Post type and its own respective taxonomy.

I have for example this URL structure: http://www.example/faq/category/sub-category/test-post/

The same content can also be accessible through this link: http://www.example/faq/category/test-post/

How can I write a rewrite so the second URL is not available especially for google SEO perspective and avoid duplicate content

Share Improve this question asked Jan 29, 2019 at 14:43 JojoJojo 113 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Your taxonomy is set to 'hierarchical' => true, do you have the post included in both the parent and child category?

If you untick the parent category and only tick sub-category then it should use the first URL only.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748965086a315215.html

最新回复(0)