I am developing a wordpress theme. I am new in this field, and it's not very easy.
I wrote the code for the loop, and everything is working perfectly. I am working on category.php page. Without the query posts, the category is correctly showing the posts from that specific category.
But, I want to add pagination, and limit the posts per page to maybe 10. But, when I add this code before the loop:
<?php query_posts( 'posts_per_page=10' ); ?>
query_posts( 'cat=3&year=2004' );
You need to add the category to the query_posts; otherwise wordpress won't know you need a category in your custom query.