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;
closed as too localized by toscho♦ May 17 '13 at 17:18
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, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.
Because you're using semicolons when you should be using colons after the
That works just fine.