我在类别 Our News & Events
> Latest News
下创建了文章。URL结构http://localhost/example/our-news-events/latest-news/
但是当我单击任何帖子时,URL更改为"http://localhost/example/news-5/。
我如何构建 URL 以遵循其层次结构,例如 http://localhost/example/our-news-events/latest-news/news-5/
- 我已经将
Permalink Settings
设置为Post name
- 已经清除了WordPress缓存,更改了主题
我找到了解决方案。在Permalink Settings
下,我必须在字段中将选项更改为自定义结构和/%category%/%postname%/