Page 1 of 1

WordPress item list for year stuck with index limit?

Posted: Fri Apr 11, 2008 7:21 pm
by JAB Creations
I'm trying to have WordPress spit out the list for all of 2008...however the only way to do that that I know of is to remove the year=2008 (since my blog just started). However I don't want to have to deal with this in a little less then a year. I'm running WP 2.5 and here is the code and the reference page I'm using currently...
http://codex.wordpress.org/Template_Tags/query_posts

Code: Select all

<?php
if (have_posts()) :
query_posts('posts_per_page=-1'&'year=2008');
while (have_posts()) : the_post(); ?>
 <div><a href="<?php the_permalink() ?>" tabindex="3" title="<?php the_title_attribute(); ?>"><?php the_time('M j, '); the_title(); ?></a></div>
<?php endwhile;
endif; ?>

Re: WordPress item list for year stuck with index limit?

Posted: Fri Apr 11, 2008 10:38 pm
by JAB Creations
Part of the tutorial had extra quotes where they shouldn't belong...removed them and it works fine.

Code: Select all

query_posts('posts_per_page=-1&year=2008');