I’ve tried a bunch of things but cannot find a solution that works.
I want my site to have the structure:
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
Currently, with /blogs/%year%/%month%/%postname%/
set as the permalink structure, everything works correctly except the authors part. It forces it to mysite.com/blogs/authors/
and mysite.com/blogs/authors/nicename
, which is not desireable, since most authors will be making custom post types and not blogs.
Some posts I checked here but without the right answer:
How to properly prefix blog post URL’s
Permalinks Question: Adding a prefix ONLY in front of the posts
You can set the author base independently by manipulating the
$wp_rewrite
global:Make sure to visit your permalinks page to flush rewrites after you add this.
The one thing you won’t get is
mysite.com/authors/ = authors archive
, as WordPress doesn’t provide this page by default, though you may be able to create anauthors
page and use a custom template, or add a rewrite rule to handle it.