comic_archive_list(years,format,order) — display a list of all comics in the archive
Displays a list (using the HTML <ul> tag) of all comics in the archive. Each comic is represented by two elements, each wrapped in a <span> tag -- One for the comic's date, one for its title.
stripShow adds some CSS classes to each element in the list to facilitate styling. The date is given the CSS class archive_date, the title is given the class archive_title. The list itself is given the class comic_archive.
Example A.17. Basic Usage
<?php comic_archive_list(); ?>
This would produce the following output:
<ul class="comic_archive"> <li> <span class="archive_date">January 4, 2009</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=222" rel="bookmark" title="Permanent Link: Comic for January 4, 2009">Comic for January 4, 2009</a></span> </li> <li> <span class="archive_date">January 3, 2009</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=218" rel="bookmark" title="Permanent Link: Comic for January 3rd, 2009">Comic for January 3rd, 2009</a></span> </li> <li> <span class="archive_date">January 2, 2009</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=194" rel="bookmark" title="Permanent Link: Comic for Friday, January 2nd, 2009">Comic for Friday, January 2nd, 2009</a></span> </li> <li> <span class="archive_date">January 1, 2009</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=193" rel="bookmark" title="Permanent Link: Comic for Thursday, January 1st, 2009">Comic for Thursday, January 1st, 2009</a></span> </li> <li> <span class="archive_date">December 29, 2008</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=211" rel="bookmark" title="Permanent Link: Comic for Monday, December 29th, 2008">Comic for Monday, December 29th, 2008</a></span> </li> <li> <span class="archive_date">December 28, 2008</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=210" rel="bookmark" title="Permanent Link: Comic for Sunday, December 28th, 2008">Comic for Sunday, December 28th, 2008</a></span> </li> <li> <span class="archive_date">December 27, 2008</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=202" rel="bookmark" title="Permanent Link: Comic for Saturday, December 27th, 2008">Comic for Saturday, December 27th, 2008</a></span> </li> <li> <span class="archive_date">December 26, 2008</span> <span class="archive_title"><a href="http://example.com/wordpress/?p=192" rel="bookmark" title="Permanent Link: Comic for Friday, December 26th, 2008">Comic for Friday, December 26th, 2008</a></span> </li> </ul>
Example A.18. Advanced Usage
<?php comic_archive_list(TRUE,'Y-m-d','ASC'); ?>
This would produce the following output:
<h3>2008</h3> <ul class="comic_archive"> <li> <span class="archive_date">2008-12-26</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=192" rel="bookmark" title="Permanent Link: Comic for Friday, December 26th, 2008">Comic for Friday, December 26th, 2008</a></span> </li> <li> <span class="archive_date">2008-12-27</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=202" rel="bookmark" title="Permanent Link: Comic for Saturday, December 27th, 2008">Comic for Saturday, December 27th, 2008</a></span> </li> <li> <span class="archive_date">2008-12-28</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=210" rel="bookmark" title="Permanent Link: Comic for Sunday, December 28th, 2008">Comic for Sunday, December 28th, 2008</a></span> </li> <li> <span class="archive_date">2008-12-29</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=211" rel="bookmark" title="Permanent Link: Comic for Monday, December 29th, 2008">Comic for Monday, December 29th, 2008</a></span> </li> </ul> <h3>2009</h3> <ul class="comic_archive"> <li> <span class="archive_date">2009-01-01</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=193" rel="bookmark" title="Permanent Link: Comic for Thursday, January 1st, 2009">Comic for Thursday, January 1st, 2009</a></span> </li> <li> <span class="archive_date">2009-01-02</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=194" rel="bookmark" title="Permanent Link: Comic for Friday, January 2nd, 2009">Comic for Friday, January 2nd, 2009</a></span> </li> <li> <span class="archive_date">2009-01-03</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=218" rel="bookmark" title="Permanent Link: Comic for January 3rd, 2009">Comic for January 3rd, 2009</a></span> </li> <li> <span class="archive_date">2009-01-04</span> <span class="archive_title"><a href="http://thaleia.local/wordpress/?p=222" rel="bookmark" title="Permanent Link: Comic for January 4, 2009">Comic for January 4, 2009</a></span> </li> </ul>
| argument | type | default | description |
|---|---|---|---|
years
|
boolean | FALSE | Display the years represented as a header between sets of comics. stripShow uses the <h3> tag for this. For example, you will see <h3>2007</h3> before the set of comics from 2007. |
format
|
string | F j, Y | The format in which to display each comic's date. This format conforms to the same format as the PHP date() function. See Appendix B, PHP Date Codes |
order
|
string | DESC | The order in which to display comics; ASC for ascending, DESC for descending. |