Hi there, I have a piece of code which is giving me an error, anyone have any ideas?:
Parse error: syntax error, unexpected T_ENDWHILE
and it is reffering to this line "<?php endwhile; ?>"
My code is below:
----------------------------------------
<div class="homebox">
<?php $recent = new WP_Query("cat=3&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
<?php
$valid = yes;
?>
<?php
if ( $valid == yes ) {
get_the_image( array( 'custom_key' => array( 'Thumbnail', 'thumbnail' ), 'default_size' => 'thumbnail' ) ); ?>
<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
<?php the_content_limit(60, ""); ?>
} ?>
<div style="border-bottom:1px dotted #C0C0C0; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
<?php endwhile; ?>
</div>
------------------------------------------
Not sure why it would be questioning the endwhile?
Many Thanks