Demo
I use this plugin in my blog at http://blog.robfelty.com
OPTIONS AND CONFIGURATIONS
$defaults=array(
'noTitle' => '',
'inExcludeCat' => 'exclude',
'inExcludeCats' => '',
'inExcludeYear' => 'exclude',
'inExcludeYears' => '',
'sort' => 'DESC',
'showPages' => false,
'linkToArch' => true,
'showYearCount' => true,
'expandCurrentYear' => true,
'expandMonths' => true,
'expandYears' => true,
'expandCurrentMonth' => true,
'showMonthCount' => true,
'showPostTitle' => true,
'expand' => '0',
'showPostDate' => false,
'postDateFormat' => 'm/d',
'animate' => 0,
'postTitleLength' => '',
'debug' => '0',
);
- noTitle
- If your posts don't have title, specify a string to show in place of the
title
- inExcludeCat
- Whether to include or exclude certain categories
- 'exclude' (default)
- 'include'
- inExcludeCats
- The categories which should be included or excluded
- inExcludeYear
- Whether to include or exclude certain years
- 'exclude' (default)
- 'include'
- inExcludeYears
- The years which should be included or excluded
- showPages
- Whether or not to include pages as well as posts. Default if false
- showYearCount
- When true, the number of posts in the year will be shown in parentheses
- showMonthCount
- When true, the number of posts in the month will be shown in parentheses
- linkToArch
- True, clicking on a the month or year will link to the archive (default)
- False, clicking on a month or year expands and collapses
- sort
- Whether posts should be sorted in chronological or reverse
chronological order. Possible values:
- 'DESC' reverse chronological order (default)
- 'ASC' chronological order
- expand
- The symbols to be used to mark expanding and collapsing. Possible values:
- '0' Triangles (default)
- '1' + -
- '2' [+] [-]
- '3' images (you can upload your own if you wish)
- '4' custom symbols
- customExpand
- If you have selected '4' for the expand option, this character will be
used to mark expandable link categories
customCollapse
- If you have selected '4' for the expand option, this character will be
used to mark collapsible link categories
expandYears
- True: Years collapse and expand to show months (default)
- False: Only links to yearly archives are shown
- expandMonths
- True: Months collapse and expand to show posts (default)
- False: Only links to yearly and monthly archives are shown
- expandCurrentMonth
- When true, the current month will be expanded by default
- expandCurrentYear
- When true, the current year will be expanded by default
- showPostTitle
- True: The title of each post is shown (default)
- showPostDate
- True: Show the date of each post
- postDateFormat
- The format in which the date should be shown (default: 'm/d')
- postTitleLength
- Truncate post titles to this number of characters (default: 0 = don't
truncate)
- animate
- When set to true, collapsing and expanding will be animated
- debug
- When set to true, extra debugging information will be displayed in the
underlying code of your page (but not visible from the browser). Use
this option if you are having problems
Examples
collapsArch('animate=true&sort=ASC&expand=3,inExcludeCats=general,uncategorized')
This will produce a list with:
* animation on
* shown in chronological order
* using images to mark collapsing and expanding
* exclude posts from the categories general and uncategorized
CAVEAT
This plugin relies on Javascript, but does degrade
gracefully if it is not present/enabled to show all of the
archive links as usual.
HISTORY
Fancy Archives Changelog
* 0.5:
* Added option to display Page entries with Posts inside the month links
* Cleaned up the list generation code
0.4:
- Added option: Trim post titles to a set size
- Added option: Optionally show ellipsis if a post title was shrunk
- Fix: Added fix for when page's content-type is "application/xhtml+xml"
0.3:
- Huge rewrite: cleaned up javascript - one function does all the work,
javascript no longer visible in page source
- Added options: month links are optional, set current year/month to be
expanded by default
- Links now link to 'javascript;' instead of '#'
0.2.5:
- Fixed an issue with displaying comment counts in < WP2.0, fixed by using
WP's internal comment counting function (Thanks Will)
0.2:
- Massive update, now has a dedicated options page (no more passing
options to function)
- Month links can expand to show individual posts
0.1: