Getting the category ID of inside of category.php or archive.php seems very easy, i struggled 3hrs to get this working.
I wanted to put up a custom query_posts() function inside category.php and the only way it works is
$cat = get_query_var(‘cat’)
You have to combine this with query_posts function
query_posts(‘cat=’.get_query_var(‘cat’) . ‘&posts_per_page=3′);
Amazingly simple isnt it!
Similar Posts:
- WordPress query posts with tags not working!
- How to redirect when post submitted for review in WordPress
- How to get parent category name in WordPress?
- GD star rating issue replacing default 0 valueg
- How to get custom field value in WordPress?
- How to show adsense on specific posts/pages in WordPress?
- WordPress – how to add custom field when post is published?
- How to output category name in WordPress?
- How to remove GET variable within $_SERVER['QUERY_STRING'] in PHP
- WordPress offline editors for blogging!

