Viewing 4 replies - 1 through 4 (of 4 total)
  • Your URL’s are broken at the moment (error 404). I suggest you make the username different from the display name. For example, admin can be renamed ‘Site Admin’ if necessary, but spaces in username lead to ambiguities. I think a validation step would prevent them from being created (??).

    Thread Starter Kim Siever

    (@kmsiever)

    Those are sample URLs, not the real ones.

    The usernames in this case are different than the nicknames (what I assume you mean by display name). In my case, for example, my username is kmsiever and my nickname is Kim Siever.

    Thread Starter Kim Siever

    (@kmsiever)

    I fixed it,

    Instead of:

    <?php
    if(isset($_GET[‘author_name’])) :
    $curauth = get_userdatabylogin($author_name);
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>

    I used:

    <?php
    if(isset($_GET[‘author_name’])) :
    $curauth = get_userdata(intval($author));
    else :
    $curauth = $wpdb->get_row(“SELECT * FROM $wpdb->users WHERE user_nicename = ‘$queried_name'”);
    endif;
    ?>

    Glad you got it sorted! I was waiting for someone else to give an opinion on this as I was clueless.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘User name not showing on author page’ is closed to new replies.