[ad_1]
for example:
Parent category – Reviews
Sub category – Hotel Reviews
​
When I write a post and check both category boxes, the post URL becomes -> example.com/reviews/xyzxyz
When i check only the hotel reviews category box, post URL becomes -> example.com/reviews/hotel-reviews/xyzxyz
I want the URL slug to be specific like the latter one, “reviews/hotel-reviews”, but can I achieve this by checking both category boxes? or does it not matter at all?
Just want this post to be under both parent and subcategory
​
[ad_2]
[https://wordpress.org/documentation/article/customize-permalinks/](https://wordpress.org/documentation/article/customize-permalinks/)
WordPress can only show one “same level” category/sub-category and will determine which one in alphabetical order.
If you selected a subcategory but didn’t specifically select a parent category, then WordPress will still include the parent category in the URL.
So to achieve what you want you have to always select the “deeper” subcategrory level, in your case hotel reviews, and the url will include the parent.
The parent categories will not show tagged on your post, but your post will show on the archive of your parent categories.
That is: your xyzxyz post will only show Hotel Reviews category, but it will show on your Reviews archive page.