I have a custom post type to get images. I am setting up my theme to display a specific way when it is first installed. For some reason, my code is stopping the bottom half of my page from displaying.
<div id="gallery">
<?php if( $loop->has_posts()): ?>
<hr />
<h1 class="tag-background"><span class="background">FROM THE GALLERY</span></h1>
<ul>
<?php
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li><?php if ( has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php the_post_thumbnail('frontpage_gallery'); ?></a> </li>
<?php endif; ?>
<?php endwhile; ?>
</ul>
<?php endif; wp_reset_query();?>
</div><!--END gallery-->
When I view source, the only part of the gallery div that shows above is the opening div. Everything after that including the footer is gone. This happened when I put all the gallery stuff between the if statement. What am I missing?
if( $loop->has_posts()):
endif;