I added the below code to my index.php and it's working fine. Then I added it to my type-[post_type].php file and it's still displaying the code for the last post on the page. I can't figure out why. Should I be doing it a different way?
<?php if( $wp_query->current_post < $wp_query->post_count-1 ): ?>
<img src="<?php bloginfo('template_directory'); ?>/images/fezhr.png" />
<?php endif; ?>
Here is my loop for one of the post types:
<?php if (have_posts()) : ?>
<div id="content">
<div id="latestLinks">
<div id="listHead">Latest</div>
<div id="listLinks"><a href="http://www.flesheatingzipper.com/" id="linksA">EVERYTHING</a> | <a href="http://www.flesheatingzipper.com/games/" id="linksG">GAMES</a> | <a href="http://www.flesheatingzipper.com/entertainment/" id="linksE">ENTERTAINMENT</a> | <a href="http://www.flesheatingzipper.com/tech/" id="linksT">TECH</a> | <a href="http://www.flesheatingzipper.com/podcasts/" id="linksP">PODCASTS</a></div>
<br style="clear:both;" />
</div>
<?php while (have_posts()) : the_post(); ?>
<div class="postWrapper">
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<div class="postDetails">
<div class="postDetailsLeft">Posted by: <?php the_author_posts_link(); ?> on <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></div>
<div class="postDetailsRight"><?php if(function_exists('the_views')) { the_views(); } ?> | <a href="<?php comments_link(); ?>"><?php comments_number('0 Comments', '1 Comment', '% Comments'); ?></a></div>
<br style="clear:both;" />
</div>
<?php
if ( has_post_thumbnail() ) {
$image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id, 'large', true);
echo '<a href="' . get_permalink($post->ID) . '" title="' . get_the_title($post->ID) . '"><img src="' . $image_url[0] . '" title="' . get_the_title($post->ID) . '" alt="' . get_the_title($post->ID) . '" class="aligncenter" /></a>';
}
?>
<?php
ob_start();
the_content('Read the rest of this article...');
$postOutput = preg_replace('/<img[^>]+./','', ob_get_contents());
ob_end_clean();
echo $postOutput;
?>
<br style="clear:both;" />
</div>
<?php if( $wp_query->current_post < $wp_query->post_count-1 ): ?>
<img src="<?php bloginfo('template_directory'); ?>/images/fezhr.png" class="fezHR" />
<?php endif; ?>
<?php endwhile; ?>
<?php wp_pagenavi(); ?>
<?php else : ?>
<div id="content">
<img src="<?php bloginfo('template_directory'); ?>/images/FEZ404.png" /><br /><br />
<p>God dammit! FEZ why do you always ruin all the fun. Sorry the page you requested has been eaten! You will just have to find something else, deal with it.</p>
<?php endif; ?>