我想修复其他人创建的WP Pro房地产3上的儿童主题。在主题的其他地方,有不同的内容导航发生。我尝试过为分页插入一个插件,并且它也不会在帖子中循环。 URL更新,但显示的10个帖子总是相同的。WP分页不通过帖子循环
这里是页面的代码。我应该在哪里首先找出可能导致问题的原因?
<?php global $ct_options;
if($ct_options['ct_layout'] == 'left-sidebar') {
get_sidebar();
} ?>
<section id="blog" class="ten columns marT20 left">
<h2> Blog </h2>
<?php query_posts('cat=-39'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('left clear'); ?>>
<?php if (has_post_thumbnail()) {
the_post_thumbnail();
} ?>
<h2 class="entry-title marB18"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<br/>
<?php ct_read_more_link(); ?>
<!-- <a href="<?php the_permalink(); ?>" class="read-more" />Read More</a> -->
<?php wp_link_pages(array('before' => '<div class="pagination">' . __('Pages:', 'responsive'), 'after' => '</div>')); ?>
</article>
<?php endwhile; endif; ?>
<?php if (function_exists("pagination")) {
pagination($additional_loop->max_num_pages);
} ?>
</section>
<div class="sidebar six columns marT20 left">
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar Blog')) :else: endif; ?>
<div id="sidebar-inner">
<aside class="widget widget_text left" id="about-nic-nav"><h4>About Nicaragua</h4>
<div class="textwidget">
<?php query_posts('cat=39'); ?>
<ul>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; endif; ?>
</ul>
</div>
</aside>
<div class="clear"></div>
</div>
</div>
谢谢你!我之前已经看到过这些参数,但是我一定是错过了一部分,以致无法工作。它虽然现在工作!干杯! – crysmeg
不客气。 –