php - What's wrong with this code? (unexpected $end on last line) -
<?php /* template name: videos */ ?> <?php get_header();?> <section id="content"> <section id="main"> <?php $c=0; $i=1; $temp = $wp_query; $wp_query = null; $wp_query = new wp_query(); $wp_query->query('post_type=videos' . '&paged=' . $paged . '&posts_per_page=16'); while ( $wp_query->have_posts() ) : $wp_query->the_post(); $c++; ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); $c++; ?> <article class="post<?php if($i%4 == 0) { echo ' right'; }; $i++; ?>" id="post-<?php the_id(); ?>"> <section class="entry"> <a href="<?php the_permalink() ?>" rel="bookmark" title="permanent link <?php the_title_attribute(); ?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'video-thumb' ); } ?></a> </section> <section class="description"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="permanent link <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> </section> </article> <?php endwhile; wp_pagenavi(); $wp_query = null; $wp_query = $temp; wp_reset_query(); ?> <?php if( $c < 16 ) : ($dummy= $c; $dummy < 16; $dummy++) : ?> <article class="post<?php if($i%4 == 0) { echo ' right'; }; $i++; ?>" id="post-<?php the_id(); ?>"> <img src="<?php bloginfo('template_url'); ?>/images/dummy-video.gif" alt="post coming soon!" /> </article> <?php endfor;?> <?php endif;?> <?php endif; ?> <section id="map"> <img src="<?php bloginfo('template_url') ?>/images/interactive-map.jpg" alt="interactive map" /> </section> </section> <?php get_sidebar(); ?> </section> <?php get_footer(); ?>
here's pastebin version: http://pastebin.com/2grja48u
i think you're missing endwhile;
first while
statement.
Comments
Post a Comment