• Does anyone know if it is possible to have a role specific permalink structure.
    role=editor ->example.com/editors/johndoe
    role=author ->example.com/authors/janedoe

    Changing the var $author_base = ‘author’ in rewrite.php only allows for 1 instance. Where/how to test for the role?

    Any ideas?Different options? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter zyrq

    (@zyrq)

    bumpy

    Thread Starter zyrq

    (@zyrq)

    Well, I guess I’ve read about everything about this in the forums for the last couple of hours.
    The closest I got is the reply by jeremyboggs on this thread:
    https://www.ads-software.com/support/topic/144217?replies=13
    The solution by jeremyboggs works perfectly to change the author_base to a single term in a custom function.
    If I only could retrieve the role of the user/author

    role=editor ->author_base = ‘editor’
    role=author ->author_base = ‘author’
    role=member ->author_base = ‘member’
    etc.

    I have tried numerous possiblities but havent come up with a solution.
    Anybody? Thanks.

    Thread Starter zyrq

    (@zyrq)

    OK, interesting conversation…

    I have this working:
    role=editor ->builds this URL: example.com/editors/johndoe
    role=author ->builds this URL: example.com/authors/janedoe

    In functions.php I added
    $wp_rewrite->author_base = ‘editors’;
    work great for the editors;

    Now I only need to have an extra rewrite rule (do I?) that rewrites
    ‘authors’ to the same as ‘editors’, its just an aka of author.
    How? which Action? which Filter? 2 extra rewrite rules? Have some coffee? Or something stronger?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘role specific permalink structure’ is closed to new replies.