Snippet producing syntax error. What am I missing?

Parse error: syntax error, unexpected ‘else’ (T_ELSE)

[php] <?php if ( have_posts() ) : ?>

		<header class="fullwidth-block page-header"> 
		<h1 class="entry-title page-title"><?php printf( __( 'Search Results for: %s', 'tonal' ), '<span>' . get_search_query() . '</span>' ); ?></h1> 
		</header><!-- .fullwidth-block .page-header -->
		
		<?php
				$ids = array();
			while (have_posts()) : $ids[] = get_the_ID();
			endwhile;
				get_jig(array('recent_posts' => 'yes', 'post_ids' => implode(',',$ids))); 
			else : get_template_part('content', 'none');
			endif;
		?> [/php]

What am I doing wrong?

I don’t see any syntax error in the snippet. Maybe you should past the entire code page.

Sponsor our Newsletter | Privacy Policy | Terms of Service