'较旧的帖子'链接到404

时间:2012-01-05 03:40:31

标签: php wordpress-theming wordpress

我在第一页编辑了我的类别模板和帖子列表。但是,当我点击“旧帖子”返回上一篇帖子时,我收到404错误。我有比第一页上显示的更多的帖子,所以这不是问题。谁知道为什么?这是我正在使用的代码。

<div class="left_col">
            <?php /* Start the Loop */ ?>
            <?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('posts_per_page=5'.'&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post();
?>


                <?php
                    /* Include the Post-Format-specific template for the content.
                     * If you want to overload this in a child theme then include a file
                     * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                     */
                    get_template_part( 'content', get_post_format() );
                ?>

            <?php endwhile; ?>

            <?php twentyeleven_content_nav( 'nav-below' ); ?>

        <?php $wp_query = null; $wp_query = $temp;?>

            </div>

0 个答案:

没有答案