简体   繁体   中英

How to create custom url structure for custom post type categories?

I am basically trying to rewrite the url structure for a custom taxonomy in wordpress from:

https://dev.energypages.com/specialization/energy-supply-distribution

To:

https://dev.energypages.com/specialization?specializingin=(parent category slug here)

And:

https://dev.energypages.com/specialization?specializingin=(parent category slug here)&specialitiesin=(Child category slug here)

I have been looking in to query vars but can't seem to figure out the code structure for what i need.

Any help on how to get started would be much appreciated thank you.

You can use this plugin for custom permalinks for the custom post type. https://wordpress.org/plugins/custom-permalinks/ I think it will work for you.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM