I am creating a Wordpress template from an HTML page.

I presently have

<?php $queried_post = get_post( $_GET['id'], $output ); ?>

I Quickly use ...

<?php echo $queried_post->post_title; ?>

Which works acceptable for echoing the publish title.

I Quickly attempt to echo the writer with...

<?php echo $queried_post->post_author; ?>

I recieve back '1' which isn't the writer title. How's this done properly?

Do this code:

<?php the_author($_GET['id']); ?>

Codex entry: http://codex.wordpress.org/Function_Reference/the_author


My single.php file:

<?php get_header(); ?>

<?php if (have_posts()): ?>
  <?php while (have_posts()): the_post(); ?>
    <div class="post post-single">
      <h1 class="post-title">
        <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
        <?php edit_post_link('Edit', '', ''); ?>
      </h1>

      <div class="content"><?php the_content(); ?></div>
    </div>
  <?php endwhile; else: ?>
  There are no posts to display.
<?php endif; ?>

<?php get_footer(); ?>