WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. EricLachance
    Member
    Posted 8 years ago #

    Hello,

    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.

    http://www.monamouchtim.com/?author=eslachance
    http://www.monamouchtim.com/?author=lucas
    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
    Member
    Posted 8 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 -->
    <?php
    if(get_query_var('author_name')) :
    $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
    $curauth = get_userdata(get_query_var('author'));
    endif;
    ?>

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

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

    <ul>
    <!-- The Loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <li>
    <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('&');?>
    </li>

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

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

  3. EricLachance
    Member
    Posted 8 years ago #

    Note:
    http://www.monamouchtim.com/author/tiff/

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

  4. Jark
    Member
    Posted 8 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:

    http://deviouslyartistic.com/author/hakfest/
    http://deviouslyartistic.com/author/krash/

    These do *not* work:

    http://deviouslyartistic.com/author/gracie/
    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