Author.php page does not show information (4 posts)

  1. EricLachance
    Posted 10 years ago #


    I've seen a few posts about this but I haven't seen a clear answer, or a detailed problem report. So here goes:

    I followed the instructions on the Codex about author templates, and copied the example script provided. When I view the page, I get "Posts By :" without a name, as well as a list of posts for that user.

    Example page: http://www.monamouchtim.com/author/lucas/
    "Lucas" is the nickname entered, eslachance is the username of the account. This account is administrator.

    I've tried a few tests without the permalinks, and here's how it goes:
    http://www.monamouchtim.com/?author_name=lucas , I get the same as above (a list of posts but no name)
    http://www.monamouchtim.com/?author_name=eslachance , I get "Posts by Lucas:" but no posts are shown.

    Both show no information, no profile, and no posts.

    In neither case do I get any more information than just the posts by, and there is no profile information displayed using $curauth->user_description; .

    Can anyone help me on this one?

  2. EricLachance
    Posted 10 years ago #

    Here's the full code. The page is normally called up using http://www.monamouchtim.com/author/lucas/ (or another username, which translates to http://www.monamouchtim.com/?author_name=lucas .

    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <!-- This sets the $curauth variable -->
    if(get_query_var('author_name')) :
    $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
    $curauth = get_userdata(get_query_var('author'));

    <h2><?php echo $curauth->user_nickname; ?>'s Profile:</h2>
    <?php echo $curauth->user_description; ?>

    <h2>Posts by <?php echo $curauth->user_nickname; ?>:</h2>

    <!-- The Loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
    <?php the_title(); ?></a>,
    <?php the_time('d M Y'); ?> in <?php the_category('&');?>

    <?php endwhile; else: ?>
    <p><?php _e('No posts by this author.'); ?></p>

    <?php endif; ?>
    <!-- End Loop -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  3. EricLachance
    Posted 10 years ago #


    Actually works... but not the others... :|

  4. Jark
    Posted 10 years ago #

    For what it is worth, I am having the same problems with the author.php page not showing information for some of the authors while showing it for others. Seems rather random too.

    These work:


    These do *not* work:

    http://deviouslyartistic.com/author/jark/ (this is the admin account)

    If anyone has any ideas then it would be greatly appreciated. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic