Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2010
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.52 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Image Attachment
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9. <div id="main">
  10.  
  11. <div id="contentwrapper2">
  12.  
  13. <?php if (have_posts()) : ?>
  14. <?php while (have_posts()) : the_post(); ?>
  15.  
  16. <div class="topPost">
  17.   <h2 class="topTitle2">Back to <a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &bull Back to <a href="#">Photos PERMALINK</a><span class="alignright2"><?php the_views(); ?></span></h2>
  18.   <div class="topContent">
  19.      <div class="attachment">
  20.     <p><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'large' ); ?></a></p>
  21.     <div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
  22.         <?php the_content('(continue reading...)'); ?>
  23.      </div><!-- Closes Attachment -->
  24.      <div class="navigation">
  25.     <div class="alignleft toppadding5">
  26. <?php ob_start(); previous_image_link(); $link = ob_get_contents(); ob_end_clean(); if($link != '') { echo '<div class="previmgtxt">PREV IOUS PIC</div>'; } ; ?><div class="previmglink"><?php previous_image_link() ?></div></div>
  27.         <div class="alignleft2"><div id="comments">
  28. <?php if (function_exists('wp_list_comments')): ?>
  29. <!-- WP 2.7 and above -->
  30. <?php comments_template('', true); ?>
  31.  
  32. <?php else : ?>
  33. <!-- WP 2.6 and below -->
  34. <?php comments_template(); ?>
  35. <?php endif; ?>
  36. </div> <!-- Closes Comment --></div> <!-- Closes alignleft2 -->
  37.     <div class="alignright toppadding5">
  38. <?php ob_start(); next_image_link(); $link = ob_get_contents(); ob_end_clean(); if($link != '') { echo '<div class="nextimgtxt">NEXT PIC</div>'; } ; ?><div class="nextimglink"><?php next_image_link() ?></div></div>
  39.      </div><!-- Closes Navigation -->
  40.   </div><!-- Closes TopContent -->
  41.   <div class="cleared"></div>
  42.   <span class="linkpages"><?php wp_link_pages(); ?></span>
  43.   <div class="cleared"></div>
  44. </div> <!-- Closes topPost -->
  45. <br/><small><?php edit_post_link('Edit this entry?','',''); ?></small>
  46.  
  47.  
  48. <?php endwhile; ?>
  49.  
  50. <?php else : ?>
  51.  
  52. <div class="topPost">
  53.   <h2 class="topTitle"><a href="<?php the_permalink() ?>">Not Found</a></h2>
  54.   <div class="topContent"><p>Sorry, but you are looking for something that isn't here. You can search again by using <a href="#searchform">this form</a>...</p></div>
  55. </div> <!-- Closes topPost -->
  56.  
  57. <?php endif; ?>
  58.  
  59. </div> <!-- Closes contentwrapper2-->
  60.  
  61.  
  62. <div class="cleared"></div>
  63.  
  64. </div><!-- Closes Main -->
  65.  
  66.  
  67. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement