i want to show posts only from one category i click. (when i’m in a category page i.e. cat=24, i see only posts from cat id = 24). how to do that ?
That was the original question. the original answer holds true – WP already does this by default.
If you have posts from other categories showing up in the wrong category, then go to “Manage” and select one of the posts that’s not supposed to be in “category 24”. Look to the right of the post. There’s a sidebar where you select what categories you want the post to appear in. Make sure you’ve got the right category selected for the post.
I would start with that before going into extra coding and extending yourself. If you *have* the right categories selected, and it’s still showing all posts in all categories, I would then suspect either the theme code, or you have a corrupted file somewhere.