the_author_posts_link returns 404 on WordPress (5 posts)

  1. Maggical
    Posted 2 years ago #

    I'm having issues in WordPress when using the the_author_posts_link function.

    Basically I have users that have special characters or spaces on their names, such as "Bufón" or "Kogi Kaishakunin" and the link that is returned by this function takes me to a 404 page.

    See the examples here:

    http://www.coliseoweb.com/author/Buf%C3%B3n/ http://www.coliseoweb.com/author/Kogi%20Kaishakunin/

    How can I fix this? I know that replacing the "ó" with a "o" solves the issues for the special character username, but I can't figure out the blank space one (I've tried a dash or removing the blank space).

    Any help on how to solve this please? How can I change that function to work correctly? Should I use another function instead?



    PS: I even tried this: <a href="<?php echo '/author/'.get_the_author_meta('user_nicename'); ?>" title="<?php the_author(); ?>" rel="author"><?php the_author(); ?></a> and it didn't work out, same issue for spaces...

  2. Maggical
    Posted 2 years ago #

    Nobody? :S

  3. Maggical
    Posted 2 years ago #

    Can anyone help? :S

  4. Sparksinfo
    Posted 1 year ago #

    You could just do a 301 redirect. I know it's fixing a symptom and not the problem by it would work.


    good luck

  5. Maggical
    Posted 1 year ago #

    The thing is that I don't know where to redirect it because I have no clue of the actual urls for those authors :S

Topic Closed

This topic has been closed to new replies.

About this Topic