Wordpress Loop does not work properly in category.php when using query_posts <p>I am developing a wordpress theme. I am new in this field, and it's not very easy. </p> <p>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.</p> <p>But, I want to add pagination, and limit the posts per page to maybe 10. But, when I add this code before the loop:</p> <pre><code>&lt;?php query_posts( 'posts_per_page=10' ); ?&gt; </code></pre> <p>It doesn't work. Now, it outputs all the posts, from every category in the website, not only from that category. </p> <p>Can anybody tell me what am I doing wrong?</p> <p>Thanks.</p>