• Hi !

    I would like to change the public author page from : sitename.com/author/nickname to sitename/author/ID

    Any idea how I could do that?

    Thanks !

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter eric34

    (@eric34)

    Hi! No it doesn’t.

    That may change the “base slug” but this is not the “author” I want to change but the “nickname” !

    ok ?? if i find something i wrote it here!

    Moderator bcworkz

    (@bcworkz)

    Intercept the query at the ‘parse_query’ action. Verify that $query->is_author is true. The ID from the URL will be in the query var ‘author_name’. WP hasn’t yet figured out the query var is not a valid author name. Use the ID to get the actual user_nicename and set the ‘author_name’ to the actual nice name value.

    The result is the usual author archive page, but accessed using author’s user ID. Unless you build in logic to detect the ID integer before getting the userdata, providing the normal nicename in the URL will cause an error.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Author slug’ is closed to new replies.