image.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php get_header(); ?>
  2. <div id="content" class="clear">
  3. <div id="main" class="clear">
  4. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  5. <article id="post-<?php the_ID(); ?>" <?php post_class('clear'); ?>>
  6. <header>
  7. <h1 class="h2"><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &raquo; <?php the_title(); ?></h2>
  8. </header>
  9. <section class="post_content clear">
  10. <p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></p>
  11. <p class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></p>
  12. <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
  13. </section>
  14. <footer>
  15. <nav class="prev-next-links">
  16. <ul class="clear">
  17. <li><?php previous_image_link() ?></li>
  18. <li><?php next_image_link() ?></li>
  19. </ul>
  20. </nav>
  21. </footer>
  22. </article>
  23. <?php endwhile; else: ?>
  24. <div class="help">
  25. <p>Sorry, no attachments matched your criteria.</p>
  26. </div>
  27. <?php endif; ?>
  28. </div> <!-- end #main -->
  29. <?php get_sidebar(); // sidebar 1 ?>
  30. </div> <!-- end #content -->
  31. <?php get_footer(); ?>