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.
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?
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<!-- This sets the $curauth variable -->
$curauth = get_userdatabylogin(get_query_var('author_name'));
$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(); ?>
Actually works… but not the others… 😐
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 do *not* work:
If anyone has any ideas then it would be greatly appreciated. 🙂
- The topic ‘Author.php page does not show information’ is closed to new replies.