Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Image Attachment
- */
- ?>
- <?php get_header(); ?>
- <div id="main">
- <div id="contentwrapper2">
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <div class="topPost">
- <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>
- <div class="topContent">
- <div class="attachment">
- <p><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'large' ); ?></a></p>
- <div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
- <?php the_content('(continue reading...)'); ?>
- </div><!-- Closes Attachment -->
- <div class="navigation">
- <div class="alignleft toppadding5">
- <?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>
- <div class="alignleft2"><div id="comments">
- <?php if (function_exists('wp_list_comments')): ?>
- <!-- WP 2.7 and above -->
- <?php comments_template('', true); ?>
- <?php else : ?>
- <!-- WP 2.6 and below -->
- <?php comments_template(); ?>
- <?php endif; ?>
- </div> <!-- Closes Comment --></div> <!-- Closes alignleft2 -->
- <div class="alignright toppadding5">
- <?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>
- </div><!-- Closes Navigation -->
- </div><!-- Closes TopContent -->
- <div class="cleared"></div>
- <span class="linkpages"><?php wp_link_pages(); ?></span>
- <div class="cleared"></div>
- </div> <!-- Closes topPost -->
- <br/><small><?php edit_post_link('Edit this entry?','',''); ?></small>
- <?php endwhile; ?>
- <?php else : ?>
- <div class="topPost">
- <h2 class="topTitle"><a href="<?php the_permalink() ?>">Not Found</a></h2>
- <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>
- </div> <!-- Closes topPost -->
- <?php endif; ?>
- </div> <!-- Closes contentwrapper2-->
- <div class="cleared"></div>
- </div><!-- Closes Main -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement