【发布时间】:2021-07-25 03:44:39
【问题描述】:
在我的网站中,我将自定义结构永久链接设置为“/post/%postname%”。我想要单个博客文章的 URL,例如 domain/post/postname,它工作正常,但除此之外,网站的每个页面都遵循 domain/post/pagename 和 domain/pagename URL,但对于页面,我只想要域/页面名称。
这两个网址都登陆同一页面
https://shergroup.com/aboutus https://shergroup.com/post/aboutus
我只想要 https://shergroup.com/aboutus 页面。
【问题讨论】:
-
在您的自定义结构中仅使用 %postname%。这对你有用.. 或者你必须编写自定义脚本来隐藏页面的帖子。
标签: wordpress url permalinks