The functions in this plugin let you select necessary posts from the templates. Below is the list of functions currently defined:
- posts_random_by_category_id(catid, max) – fetches max random posts from the category specified by catid
- posts_random_by_category_name(catname, max) – fetches max random posts from the category specified by catname
- posts_by_category_name(catname, max) – fetches max last posts from the category specified by catname
Usage
There’s nothing to describe in fact. Just activate plugin and use it in your templates, like this:
$posts = PostTools::posts_random_by_category_name(‘mycat’, 5)
The call above fetches maximum 5 random posts from the category mycat. The other functions work in a similar way.
Downloads
- Version 1.0 (11/09/2006)
Installation Instructions
Installation is quite straight-forward:
- Unzip the archive to your plugins folder
- Go to the WordPress plugins admin panel then activate the [NCG] Post Tools plugin.
Future Directions
No idea so far.
The Ruby on Rails addict, industrial photographer and amateur electronic music composer. In the mean time I build great web applications, contribute to OSS and help AVAAZ to save Great Barrier Reef.