[wp-hackers] Complete list of articles

Otto otto at ottodestruct.com
Mon Feb 4 19:45:03 GMT 2008


On Feb 2, 2008 6:48 PM, Elliotte Harold <erharold at gmail.com> wrote:
> Anyone know off the top of their head if there's an easy way to generate
>   complete list of the dates and titles of all articles in a blog? I can
> probably hack this up if I need to, with  a straight SQL query if I need
> to, but perhaps someone here knows a quick two-liner to accomplish this.

query_posts($query_string.'posts_per_page=-1');
while(have_posts()) { the_post();
the_time();
the_title();
}

If you want to make the thing paged, just change the posts_per_page
number to how many you want to show on each page, then add some next
and previous link calls to make it paged.


More information about the wp-hackers mailing list