我尝试了很多方法,但都找不到有效的解决方案。
我希望我的网站具有以下结构:
mysite.com/ = homepage
mysite.com/blogs/ = blog archive
mysite.com/blogs/year/ = blog archive (in a specific year)
mysite.com/blogs/year/month/ = blog archive (in a specific month)
mysite.com/blogs/year/month/postname = blog post
mysite.com/authors/ = authors archive
mysite.com/authors/nicename = author profile
mysite.com/customposttype/ = custom post type archive
mysite.com/customposttype/postname = custom post type post
目前,使用/blogs/%year%/%month%/%postname%/
设置为permalink结构,除作者部分外,所有内容都正常工作。它迫使它mysite.com/blogs/authors/
和mysite.com/blogs/authors/nicename
, 这是不可取的,因为大多数作者将定制帖子类型,而不是博客。我在这里查看了一些帖子,但没有正确答案:
How to properly prefix blog post URL's
Permalinks Question: Adding a prefix ONLY in front of the posts