Author name outside of loop?
-
I’m trying to include the authors name at the top of the authors page, the one you come to, to see all their posts:
<?php get_header(); ?> <div id="contentwrap"> <div id="content"> <div class="posts"> <!--Post begins --> <div class="post"> <div class="postcontent"> <div class="story"> <h2><?php echo get_the_author_link(); ?></h2> <?php while (have_posts()) : the_post(); ?> <h3 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'shape'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h3> <?php the_excerpt(); ?> <?php endwhile; ?> </div> </div> <div class="clear"></div> </div> <!--Post ends --> <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Now if I put the author name in the loop.. it will, of course, repeat it for each story it generates.
Is there a way around this? It seems to work fine for the category page.
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Author name outside of loop?’ is closed to new replies.