我的category.php
在第一页列出文章,在底部我有一个寻呼机。
当我单击第2页时,索引。php页面已加载,url如下所示:http://
www.mysite.com/some-category/page/2
.
为什么不是类别。当URL/page/2/
?
我的permalink结构如下所示:/%category%/%postname%/
如果有助于查看代码,请参见:
<?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(); ?>