如何根据附加的自定义分类法设置自定义记录类型的URL?

发布于 2025-01-24 21:21:25 字数 552 浏览 0 评论 0原文

我创建了一个自定义帖子类型(storages)/storage/:

图像中的示例

也附上了自定义分类法(区域)/storage/us/new-york/:

图像中的示例

现在,当添加任何记录时,我会生成以下类型/storege/storage/my-nockorage/的URL。

如何实施以使分类法的层次结构在URL中观察和替代?

如何获得此结果:/storage/us/new-york/my storage /storage/us/my-starge

I created a Custom Post Type (Storages) /storage/:

Example in the image

Also attached to them Custom Taxonomies (Regions) /storage/us/new-york/:

Example in the image

Now, when adding any record, I generate a url of the following type /storage/my-storage/.

How to implement so that the hierarchy of taxonomies is observed and substituted in the url?

How to get this result: /storage/us/new-york/my-storage or /storage/us/my-storage

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文