【发布时间】:2019-02-16 20:09:18
【问题描述】:
我的 Resort 页面有这个 URL page-resorts.php:
http://localhost/testwordpress/resorts/
点击 Resort 自定义页面下的帖子链接后,我将获得自定义页面模板 (CPT) 的 URL single-resort.php:
http://localhost/testwordpress/resort/kurumba-maldives/
如您所见,resorts 已更改为 resort,因为我不能将 resorts slug 用于 slug 帖子。
我怎样才能获得这种网址:
http://localhost/testwordpress/resorts/kurumba-maldives/
在哪里使用了resorts 字而不是resort 字?
听说过自定义slug,搜了一下,还是看不懂。
【问题讨论】:
标签: php wordpress plugins custom-post-type slug