[wp-trac] [WordPress Trac] #2755: Ability to have get_archives
start with older archives
WordPress Trac
wp-trac at lists.automattic.com
Wed May 31 20:25:57 GMT 2006
#2755: Ability to have get_archives start with older archives
----------------------------+-----------------------------------------------
Id: 2755 | Status: new
Component: Administration | Modified: Wed May 31 20:25:57 2006
Severity: enhancement | Milestone: 2.1
Priority: normal | Version: 2.0
Owner: anonymous | Reporter: FireMotion
----------------------------+-----------------------------------------------
Right now, when using get_archives, it always starts with the first item.
Its limit function can only be used to select the number of archive links
to show, but not where to start. Here's a short example, but just imagine
it with 50-60 items. I want Wordpress to be able to show stuff like this:
Most recent[[BR]]
* May 2006[[BR]]
* April 2006[[BR]]
[[BR]]
Older items[[BR]]
* March 2006[[BR]]
* February 2006[[BR]]
* January 2006[[BR]]
[[BR]]
[[BR]]
Using code like this (the second parameter is the limit parameter):
{{{
echo "Most recent<br>";
get_archives('monthly', '2', 'html', '', '', TRUE); // show two
echo "Older items<br>";
get_archives('monthly', '3,*', 'html', '', '', TRUE); // start with the
third, show the rest
}}}
(Ofcourse, this might not be on one page, but a combination might be used
on different pages throughout the website). Other examples could be:
{{{
get_archives('monthly', '3,2', 'html', '', '', TRUE); // start with the
third item, show two items
}}}
So basically using the limit parameter analogue to the SQL limit
statement, so that the archives that get_archives produces can be manually
broken down in smaller pieces.
--
Ticket URL: <http://trac.wordpress.org/ticket/2755>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list