I have made a category archive page called category-blog.php. However I need now to make this page a custom template for a page, the page works fine when simply browsing to mydomain.com/blog, because wordpress does some sort of query I guess before running this template. What I need to know is what is this query so I can run it before it hits my template page. I need so that the pagination etc works before looping through the results of the query.
Hope this makes sense, it's difficult to put down in words.