• author-template.php line 272 get_author_posts_url() uses author nice name.
    This seems problematic to me given that the nice name’s intention is for display rather than the url. This could lead to urls that contain characters that really shouldn’t be there.

    I don’t know if the right answer is to use another field (like username) or to urlencode the nicename, but it seems like something needs to happen.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It sanitizes the name and removes characters that can’t display, I believe.

    Thread Starter MikeNGarrett

    (@mikengarrett)

    As an example, let’s use a random name I found.
    ?sk W?ppling
    This would be the preferred nice name, but url encoding it would lead to a url such as https://example.com/author/%3Fsk%20W%3Fppling

    Gross.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Actually, no, the nicename’s intention is specifically for the URL. The display_name is the value that is intended for displaying on the site.

    There is no way within the WordPress interface to edit the nicename, as far as I am aware. The nicename is normally sanitized to be a url-safe version of the username.

    Thread Starter MikeNGarrett

    (@mikengarrett)

    Thanks for clearing that up. Something funny must be going on with the install I’m working with, but I can confirm that other installs are pulling from the username and not the display name.

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