I have WooCommerce installed already and the category url of WooCommerce is like this:
url.com/product-category/category1 works fine for displaying the category.
This is what I am aiming to achieve. url.com/product-category/category1/pagename
category1 is the name of the category which is set in the page back-end in custom field.
pagename is the name of the page.
You can Organizing Your Pages with Parent page
To create a subpage
- Go to Administration > Pages > Add New screen.
- In the right menu, click the "Page Parent" drop-down menu. The drop-down menu contains a list of all the Pages already created for your site.
- Select the appropriate parent Page from the drop-down menu to make the current Page a child Page.
- Add content to the subpage.
- Click Publish when ready.
When your Pages are listed, the Child Page will be nested under the Parent Page. The Permalinks of your Pages will also reflect this Page hierarchy.
I looked for same solution to custom post type and found a lot codesnippet solutions for category functions here. But i will just recommend rewrites at manageable permalink like https://wordpress.org/plugins/advanced-permalinks/ . However checking out categories URL codex might be more slim option.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.