I am using archives by month, the output is like
Ihat I want is, when someone clicks on september for example, he should see the posts which were published in september and were of category "A".
Wordpress has an excellent documentation on how o do all kind of things... If you're gonne loop through posts that you've called for you should use get_posts and then there is diffrent arguement for the function you could use that is explained further at wordpress site and to get what
WordPress use archives.php template file to display post of a selected month and to display categories use category.php page template file. To display all post form a selected month and from specifies category you have to use custom query
Tested: The following returned only the specified month sorted archives on archive.php: Each month labeled buttons will link to the correct category based archive with get_month_link;
<a href="<?php echo get_month_link('2012', '10'); ?>">October 2012</a>
Refer to the Codex entry for the Template Hierarchy:
So, if you have a category, 'lamps', with a category ID of 1, you could do either of the following:
category-lamps.php or category-1.php
And WordPress will use that template to render the archive index page for that category. Here is the date based archive hierarchy: