Forums

[resolved] Author Page error with display_name and nickname (10 posts)

  1. sammy123
    Member
    Posted 3 years ago #

    Our blog has a custom authors pages with the following:

    Author Archive for <?php echo $curauth->display_name; ?>

    But, strangely, it does not work for a few authors (but the majority, just fine). We made sure that their display name is set-up correctly, and they are -- in fact, it shows just fine for each post. But, just the author page is the problem.

    Any help would be appreciated! Thanks!

    BTW: We tried changing it to $curauth->nickname; wit the exact same authors' names not showing up.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    There is no template tag $curauth->display_name, so it looks like you're using a custom theme which has a bug in its code on that page.

    http://codex.wordpress.org/Template_Tags/wp_list_authors

  3. sammy123
    Member
    Posted 3 years ago #

    There is no template tag $curauth->display_name

    Sure, there is. Look at: http://codex.wordpress.org/Author_Templates

    Also, it works for some authors' archive pages, but not others. So, that means the code works to some degree.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    http://codex.wordpress.org/Author_Templates

    That's not referencing a template tag. It's example code that is based upon you first getting the data into the variable $curauth. Which reinforces my point that you have custom code in your template that may need updating/correcting.

  5. asechrest
    Member
    Posted 3 years ago #

    There's some code there in the link that deals with populating the $curauth variable. Maybe make sure you're populating the $curauth variable correctly before trying to use it.

  6. Justin Tadlock
    Member
    Posted 3 years ago #

    <?php $curauth = get_userdata( get_query_var( 'author' ) );  ?>
    <?php echo $curauth->display_name; ?>
  7. sammy123
    Member
    Posted 3 years ago #

    Yes, I have this:

    <?php $curauth = get_userdata( get_query_var( 'author' ) );  ?>
    <?php echo $curauth->display_name; ?>

    But, it works for some author names, and not others.

  8. LChambers
    Member
    Posted 2 years ago #

    Hello:

    WordPress show in web browser:
    mydomain.com/author/user_login (admin) when the function the_author_posts_link() is used.

    When it should be:
    mydomain.com/author/display_name
    Function the_author() is used and show page error no found.

    It's no logic than WordPress show to everybody my user_login when i change it for security.

    Anyone know any solutions?

    Sorry, my english is bad.

    I hope you understand me.

    Thank you

  9. snurk
    Member
    Posted 2 years ago #

    I agree with you LChambers.. WordPress should have a better solution.. Searched plugins?

  10. snurk
    Member
    Posted 2 years ago #

    Tried this? http://wordpress.org/extend/plugins/display-name-author-permalink/

    It seems to mess up my "Co Author Plus" installation and only displays the posts I originally authored. But other than that seems to be fine on wp 2.9.2

Topic Closed

This topic has been closed to new replies.

About this Topic