I want to link to an archive page in WordPress, so like:
<a href="<?php page( 2 ); ?>">link</a>
so if a for example a category page is shown, this link needs to go to the second page for that category.
After a long search on the Web, I decided to take a look at the plugins @anjum sent, and found out this can be done through:
<a href="<?php get_pagenum_link($i); ?>">Link to page $i</a>