Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged category



1 2 Next »
How to get actual category name in wordpress if is_category() is true
0 85 posted 10 years ago by AlessandroCoscia
Usually use in a template with `in_category()`, like `if ( in_category( 3 ) || in_subcategory( 3 ) ) { ...`. Tested in WP 2.8.4.
1 126 posted 11 years ago by cyberhobo
1 157 posted 11 years ago by dsheetz
This code replaces a normal category template. It sorts all posts by their category/subcategory instead of bunching them all together and ordering them by date. A bit complicated to explain in a box this size... Check the link for a run through!
1 147 posted 11 years ago by rocktronica
If you leave out the "paged" parameter, the same results are queried and shown on each pagination. Of course, you'll want to change the "3" to whichever category you'll want to exclude.
3 153 posted 11 years ago by rocktronica
wordpress in subcategory
2 123 posted 11 years ago by Ashung
Used to display the latest X number of posts from the specified category.
5 130 posted 11 years ago by creator
For use on a single page... Only displays the content if the displayed post is in the specified category. You can use the category slug or the category ID if you know it.
6 183 posted 11 years ago by creator
This is an example of how to use the articleHandler.class.php , this class can be found @ pietervp.com -> downloads
1 112 posted 13 years ago by pietervp
1 2 Next »