There are a few answers, scattered around this forum. To summarise:
Configure your Permalinks:
- Head to
Dashboard > Settings > Permalinks
- Scroll down to ‘Product Permalinks’ and select ‘Custom Base’.
- Enter
/%category%/
into the text field and then select ‘Save’.
Assign Product Categories:
If your products are still not showing the Child Categories, within the URL, it could be because you are selecting both the Parent and Child Categories, for the Product to be assigned to. Simply select the Child Category only and you should now see the Product’s URL structure showing both the Parent and Child Category.
Related Posts:
- How to get permalinks with category base working with sub-categories
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Multiple post categories – single permalink
- How to create a custom url for a category [closed]
- Exclude subcategories from the url
- WooCommerce change category url and product base
- Add “page-a” slug to category link if user visit category link from “page-a”
- Remove subcategory and category with some rules from permalink
- Hierarchical permalink structure for posts showing categories and sub-categories
- A different permalink structure for different categories
- How to remove category name for only one category?
- Category URL’s 404 after setting category base to ‘.’
- Accessible Subcategory URL’s pages without using .php hack
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Multiple Parent Category URLs
- Remove parent category from permalink? Basically only have the child category?
- Posts URL structure like site.com/category/the-post-title
- How to remove the term “category” from category pagination?
- Category archive by year with permalink support /category/YYYY
- Add a URL prefix to permalinks of one category of posts only
- Force WordPress to Show Pages Instead of Category
- How do I use the same post slug for different Categories?
- Rewrite rule page url with category
- Add forward slash on categories url (serve one version of a url)
- Using URL parameters, list posts from category and custom taxonomy
- Rewrite category wordpress
- Changing the category permalink structure
- Root level category, tag, author and archive pages to work
- Categories and Tags returning 404 on the sidebar when using ugly permalinks
- Page with the same name of a category
- Archive pagination causing 404 with permalinks structure
- Permalinks – Different structures for different categories?
- Plural Category Base Slug On Category Archive Page
- Removing category base form links messes up the parent-child behavior
- Get a permalink structure of /%posttype%/%category%/%postname%
- Best way to programmatically link to multiple categories (union/intersection) [closed]
- How to set up Author archives with sub category URL
- Viewing category pages without the word ‘category’ in URL
- How to filter posts by format and category via url?
- How to Filter categories in the permalink structure
- Specifying multiple categories in URL (permalink)?
- Redirect category to url with /category
- Rewrite a category
- How do I get rid of “category” from my URL structure?
- One Specific Category To Permalink
- Category being displayed without base parmalink
- wordpress sub-category ( lowercase letters + non-latin characters ) = 404
- Removing post category base giving Error 404
- The default code for “posts_nav_link” on category.php isn’t working
- Have different permalinks based on category
- Permalinks: display just one kind of wp category in the posts url
- Multiple URL’s based on category for one post
- Same base for category and post
- category permalinks
- Hide uncategorized when no category set
- WordPress URL Rewrite for dynamic and customized URL
- Get category URL knowing it’s id
- Have multiple category queries from the URL been fixed yet?
- How to add a post without assigning to a category?
- How to get Next/previous_post_link to go through articles in top parent category
- Nicer URL for viewing category of posts?
- How do I add a tag slug to a category URL to filter posts?
- How to Link to Most Recent Custom Post of Same Term
- Redirect Changed Permalink on wordpress
- Category url generate 404 error
- What Must to Display the “mysite.com/category” URL?
- How do I change the category permalink structure?
- Advanced permalinks structure
- Categories show 404 error on multisite installation
- Subcategory Page URL to Display Only Posts from that Subcategory?
- Include specific category in URL automatically
- WooCommerce Product category can be shown with multiple related URLs
- Can I show category name in url for only one of my categories?
- How to set the same base url for two different taxonomies?
- Is this process OK to replace URL structure?
- Is it possible to set up blog categories without changing permalink structure
- Remove WP Core canonical for category pagination
- Category page 404s on mobile but not desktop?
- Include a page’s “category” in its URL
- Subcategory Page 404ing
- Remove base category gives 404 error
- Custom permalink /%category%/%postname%/ produces 404 on each post
- WordPress Category url redirects to subdomain
- WordPress and “pretty permalink”
- Get full control over custom post type url
- How to switch from custom post type URL to category URL?
- Group Posts by First Letter of Title categories
- Using categories and pages in menus
- Page Type with Category Link
- hierarchical taxonomy in permalinks? using same slug
- Changing Permalinks for Category Pages Only
- Link categories to last post
- How can I get rid of the the category suffix–NOT “prefix” (i.e. foo-1, foo-2, etc)
- How do I hide posts in a category from all listings but still allow the posts to be viewed?
- Create custom Perma link
- Custom permalinks structure
- Remove /category/ from category (archive) page URLs (without using a plugin)
- How to get category slug link? ( include parent categories)
- Use same wordpress category base and tags as the prefix as the post permalink
- WordPress how to remove parent slug from category URLs