Change the Settings -> Permalink
to Custom Structure /%category%/%postname%/
Now while editing the post, check only the subcategory
and now the parent category is nested within the URL automatically.
Related Posts:
- Why does wordpress still strip my query var?
- Tricky URL rewrite with custom values in url
- Add a query string to ALL links on site
- Add rewrite rule for rewrite endpoint
- add_rewrite_rule not working for language specific characters
- How to add custom variable in url without redirect?
- Rewrite custom post type URL parameters
- Help with Rewrite Rule for Custom Post Type with Query String
- Change pagination url format
- Per Page Permalink Structure for Page Post Type
- Rewrite /category/cars into /topics/cars
- custom wordpress rewrite
- How to use wp rewrite to hide form action url?
- Dynamic URL with rewrite rule not working
- How do I rewrite URL that has custom parameter
- Pagination appearing twice in URL after rewrite
- URL Rewrite for CPT single posts
- Rename page URL
- WordPress post-type create url rewriting
- How to add custom rewrite rule to .htaccess?
- Problem with add_rewrite_rule and pagination (paged and page query_vars)
- How to change default page slug?
- Rewrite url for custom post type
- add_query_vars and add_rewrite_rules
- When to call `add_rewrite_rule` for safety
- Rewrite rules goes away
- custom htaccess rewrite rule for page
- flexible rewrite ‘ramble’ URLs with WordPress
- Rewrite Rule for Post “Subpage”, with pagination
- Need to make a php file inside theme accessible via url
- How to change page URLs to “www.site.com/page” instead of “example.com/blog/page” but keep post URLs as “example.com/blog/post”?
- Add_query_arg + two times the same argument?
- Rewrite loading custom template file but is_home() returns true, and there’s no 404
- Rewrite rule for admin-ajax.php
- add_rewrite_rule not registering on Multisite
- Change WordPress comments url / word
- How to check current URL for endpoint in a template file?
- How to Modify Existing Rewrite Rules?
- Custom rewrite rule
- Single Redirection Rule for Pages and Archive links
- Is it possible to remove feeds from rewrites?
- Flush Rewrite Rules on init or rest_api_init?
- WordPress .htaccess – route other URLs to another app
- Rewrite URL – insert custom variables as a directory path
- How to properly rewrite url by custom var
- Can’t add external rewrites
- Preserve Domain Alias
- WordPress Rewrites – How can I pass a variable to Custom Post Type?
- Need to add rewrite rule that adds in additional information about the post to url
- Front custom edit post page for each post
- add_rewrite_rule is redirecting instead of rewriting url
- A clean custom rewrite rule for weekly archives
- Rewrite Question Mark in Post Template to Make it Pretty URL
- I want to add a new tag to WordPress URL permastruct
- Rewrite rules automatically for pages using specific template
- Add language prefix to permalinks
- Custom Rewrite rule to captured post (rewrite rule to rewrite rule)
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- How to pass url as a parameter in a add_rewrite_rule
- Customise particular RSS permalink
- ReWrite rule for files of a previously standalone blog moved to network
- RSS feed rewrite matching wrong rule
- Best way to trigger rewrite rules
- Trouble with question mark in rewrite rule
- Removing “www” from a site URL
- Getting back a permalink from custom url
- Custom rewrite rule not working
- Weird characters behind every single link and images
- How do I make WordPress revise an .htaccess file a certain way?
- How can I allow trailing slashes on some URLs without a redirect, but not on others?
- Can’t use a specific custom URL (slug)?
- How do I get posts to appear at mydomain.com/blog?
- How to change an existing wordpress page rewrite rule?
- Adding the amp url prefix to the beginning
- Custom route and extract data from slashes and parameter
- How to change search page url so that it still returns a page when there’s no search query specified?
- Allowing multiple URLs for same Post
- How to create dynamic URLs on WordPress?
- Using a template file for a specific custom URL
- How to redirect to a login virtual page?
- Multiple permalink with and without category for same post
- Issue with custom rewrite for products and permalinks
- Prefix only some posts with a custom prefix
- Help adding custom url, rewrite_rules_array
- Broken page redirect
- Rewrite rule not redirecting correctly
- Get custom posts by segment of the URL
- Use Parent Pages for URL Structure without Landing Page
- add_rewrite Rule
- rewrite rule of post when accessed from archives pages
- How to create short urls for sharing and downloadable content?
- How to stop WordPress creating URLs that don’t exist
- How to make a custom route with any-string-part/number-part pointing to an existing page?
- Help with url rewrite
- Remove url parameter using wordpress
- Rewrite Page Parameters
- Rewrite rule to simulate page hierarchy results in 404
- add_rewrite_rule not working with custom variables
- add_rewrite_rule doesn’t work when trying to add a new parameter at the end of URL
- Standard Regex syntax doesn’t work in WordPress rewrite rule