I'm trying to minimize my code and have put together this little snippet, it doesn't seem to work however. What am I missing?
query_posts( 'year=2011' ); if ( have_posts() ); while ( have_posts() ); echo 'test'; endwhile; wp_reset_query(); endif;
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
Because you're using semicolons when you should be using colons after the
That works just fine.