Title: author pages
Last modified: August 18, 2016

---

# author pages

 *  Resolved [laurazucchetti](https://wordpress.org/support/users/laurazucchetti/)
 * (@laurazucchetti)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/author-pages/)
 * I have created an author page so when an authors name is clicked they will go
   to the author page that firstly says:
 * **Viewing all posts by abc_author:**
 * then displays posts…
 * This all works great however for some reason it repeats the **Viewing all posts
   by abc_author:** at the top of every post instead of just appearing once at the
   top of the page. Here’s my template code:
 * <?php get_header(); ?>
 * <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 * <?php
    if(isset($_GET['author_name'])) : $curauth = get_userdatabylogin($_GET['
   author_name']); else : $curauth = get_userdata($_GET['author']); endif; ?>
 * <h2 class="author">Viewing all posts by <?php echo $curauth->first_name; ?>:</
   h2>
 * <div id="post-<?php the_ID(); ?>" class="entry"> etc etc etc
 * Does anyone know how I can stop this repeating head and just get it to display
   once?
 * Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/author-pages/#post-505552)
 * You placed your “Viewing all posts by” header in [The Loop](http://codex.wordpress.org/The_Loop)
   for your posts, so it will repeat with each post that appears.
 * To fix, move this:
 * `<?php
    if(isset($_GET['author_name'])) : $curauth = get_userdatabylogin($_GET['
   author_name']); else : $curauth = get_userdata($_GET['author']); endif; ?>
 * `<h2 class="author">Viewing all posts by <?php echo $curauth->first_name; ?>:
   </h2>`
 * to just above where The Loop starts:
 * `<?php if (have_posts()) : while (have_posts()) : the_post(); ?>`
 *  Thread Starter [laurazucchetti](https://wordpress.org/support/users/laurazucchetti/)
 * (@laurazucchetti)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/author-pages/#post-505557)
 * Thanks so much that fixed it. 😀 Phew.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘author pages’ is closed to new replies.

## Tags

 * [author](https://wordpress.org/support/topic-tag/author/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [laurazucchetti](https://wordpress.org/support/users/laurazucchetti/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/author-pages/#post-505557)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
