Category Magic allows you to do many magical things with categories.
1) Download the plugin.
2) Extract the plugin.
3) Upload this category_magic.php file to your WordPress Plugins directory.
4) Activate the plugin.
5) Find the code that suits your needs and put it in your template or page/post. If you put it in a page or post, you need to have the WP-Exec plugin installed and activated.
Note: This plugin work either inside or outside of the loop.
Be sure to put all of these function calls inside php tags. (<?php functioncall ?>)
To display posts in a single category, use this function call: glmcatpost('x','z');
x is the category ID and z is the number of posts you want displayed. This call returns z posts in category x.
To display random posts in a single category, use this function call: glmcatranpost('x','z');
x is the category ID and z is the number of posts you want displayed. This call returns z random posts in category x.
To display random posts that belong to two categories, use this function call: glmdobcatranpost('x','y','z');
x is the dominant category ID, y is the secondary category ID and z is the number of posts. This call returns z random posts that belong to BOTH, x and y, categories.
To display a number of posts that belong to two distinct categories, use this function call: glmdobcat('x','y','z');
x is the dominant category ID, y is the secondary category ID and z is the number of posts. This call returns the last z numbers of posts that belong to BOTH, x and y, categories.
This call is not 2.3 ready, yet. To display random posts in a random category, use this function call: glmrancatranpost('z');
z should be the number of posts you want to show. This call returns z random posts.
Requires: 2.3 or higher
Compatible up to: 2.9.2
Last Updated: 2008-10-25
Downloads: 10,047
Got something to say? Need help?