My category.php lists articles on the first page, and on the bottom I have a pager.
When I click page 2, the index.php page is loaded and the url looks like this: http://
www.mysite.com/some-category/page/2.
Why isn't category.php page loaded when URL has /page/2/ ?
My permalink structure looks like this: /%category%/%postname%/
If it helps to see the code, here it is:
<?php
/**
* Template Name: Article List - Category
*
* Displays articles from magazine
*
* @package WordPress
* @subpackage Norwegian_Fashion
* @since Norwegian Fashion 1.0
*/
get_header();
// Get current page. Is used for pagination.
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
<div id="mainArea">
<div id="articleList">
<ul>
<?php while (have_posts()) : the_post(); ?>
<li>
<div class="photo">
<a href="<?php the_permalink(); ?>"> <?php the_related_image_scaled('h=180') ?> </a>
</div>
<div class="info">
<span class="date"><?php the_date(); ?></span> | by <span class="byline"><?php the_custom_author(); ?></span>
<header> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1></header>
<div class="intro"><?php the_intro('num_words=25'); ?></div>
<div id="post_metadata">
<div class="keywords"> <?php the_tags('Keywords: ', ','); ?> </div>
</div>
<div class="commentsCount"><?php comments_number('no comments','1 comment','% comments'); ?></div>
</div>
</li>
<?php endwhile; ?>
</ul>
<?php
if(function_exists('wp_pagenavi'))
{ wp_pagenavi(); } ?>
</div>
</div>
<aside>
<div id="sidebar">
<ul>
<?php //dynamic_sidebar( 'frontpage' ); ?>
</ul>
</div>
</aside>
<?php get_footer(); ?>
