简体   繁体   English

如何为自定义帖子类型类别创建自定义URL结构?

[英]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: 我基本上是想从以下方式重写wordpress中自定义分类法的url结构:

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

To: 至:

https://dev.energypages.com/specialization?specializingin=(parent category slug here) https://dev.energypages.com/specialization?specializingin=(此处类别为ug)

And: 和:

https://dev.energypages.com/specialization?specializingin=(parent category slug here)&specialitiesin=(Child category slug here) https://dev.energypages.com/specialization?specializingin=(此处是类别的子弹)&specialitiesin =(此处是子类别的子弹)

I have been looking in to query vars but can't seem to figure out the code structure for what i need. 我一直在查询vars,但似乎无法弄清楚我需要的代码结构。

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. https://wordpress.org/plugins/custom-permalinks/我认为它将为您工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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