• I currently have my permalinks set to

    /%category%/%author%/%postname%/

    I also want people to be able to use a permalink to find all post by an author, .i.e.

    /%author%/%category%/%postname%/

    or even by putting a a€?by-a€? in the first subdirectory, i.e.

    /by-%author%/%category%/%postname%/

    Are there any hacks that allow both by category and by author to be the primary subdirectories at the same time. If not, anyone got any ideas on where to start?

Viewing 1 replies (of 1 total)
  • You can’t simultaneously use %author% and êtegory% as top-level rewrite variables. Consider the following URL:
    https://example.blog/foo/bar/a-post

    How can Apache or WordPress know whether foo is the category, and bar is the author, or if it’s the other way around?

    Using the by- prefix, you could manually create the rewrite rules in your .htaccess file. The by- prefix will disambiguate author URIs from category URIs, provided that the author permalinks occur first in your .htaccess file.

Viewing 1 replies (of 1 total)
  • The topic ‘Enabling both Category and Author as primary permalink variables’ is closed to new replies.