Behold, version 0.2 of my category archive plugin!
Changes
- Some type checking on the parameters passed in to the functions.
- The addition of get_limited_category_archive(), which gets only the categories specified
- The inclusion of a $getchildren parameter to the standard archive-getter, which allows excluding the display of child categories
Function Reference
- get_category_archive($limit = 10, $parent = 0, $getchildren=true)
-
- $limit is the maximum number of posts to get for a category. 0, -1, or none will get all of the posts.
- $parent is the id of the parent category to get.
- $getchildren specifies whether the children of the categories should be displayed
- get_limited_category_archive($categories, $limit = 10)
-
- $categories is the list of categories to retrieve. This can be either an array of category ids, or it can be a comma seperated list (for example: 1,2,5,7)
- $limit is the maximum number of posts to get for each category. 0, -1 or none will get all posts.
Output
css class = categoryarchive
css class = categoryarchivename
{the name of the category}
{the name of the category}
css class = categoryarchivedesc
{the description of the category, if set}
{the description of the category, if set}
css class = categoryarchiveposts
{the most recent postings for this category. If there are more postings than the limit specified, a link is included to the category page.}
{the most recent postings for this category. If there are more postings than the limit specified, a link is included to the category page.}
Download
The plugin lives at http://www.neato.co.nz/plugins/category_archive.txt
Well, I’m trying it here: http://www.zeitung-hk.de/category/artikel/ and it works nice, but why doesn’t it show the link to the one article I actually wrote under “Artikel”? hmmm.
I call it like this
I hope that’s correct.