Author Name Not Showing on author.php
Hi, I’ve been having this problem with my blog where the author name doesn’t show up on it’s respective author page. I have author.php running just fine. All the posts show up and stuff. But the author name just doesn’t show up.
I have it in the header/title thing, scripted like this: Posts by [insert name]. But the name never gets inserted. I’ve stuck in every bit of in loop and out of loop coding I’ve found on this site but nothing has worked. Any ideas of what’s wrong? I would like to have the author’s name at the top of their post.
Here’s the link to the blog: http://www.the-vent.net/freshair/
You can see the list of authors on the side.
Any help is appreciated D: I would like to get the kinks worked out of this thing ASAP.
Did you try the solutions from here:
There is also an author page plugin, just search for it…
Yes, I’ve tried all of that. None of it works.
Here’s my coding for the author page:
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<!-- This sets the $curauth variable -->
$curauth = get_userdatabylogin($author_name);
$curauth = get_userdata(intval($author));
<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(); ?>
Does it look all right? It’s mostly copied from WordPress.
I just copied your code in the author.php on a local install and it works perfectly – showing the author’s nickname (the only difference I don’t use permalinks on my local WP install, but I don’t think that would make a difference).
Ugh, it’s been weird lately. Today I made a new page and now it’s stuck on like this perma-HTML weird thing where it f***s up this table and won’t like submit and reset buttons show on a form.
Yeah showing the author’s name definitely doesn’t work on my site. I tried it in all my browsers (Safari, Firefox, and IE) and it doesn’t work in any of them.
Maybe I should delete and then re-upload the author.php?
- The topic ‘Author Name Not Showing on author.php’ is closed to new replies.