Php 2个wp查询与分页冲突

Php 2个wp查询与分页冲突,php,wordpress,pagination,Php,Wordpress,Pagination,我一直试图在同一页上显示一篇特色文章和最新文章,但当我使用分页时,它在永久链接中显示/page/2,但它显示与第1页相同的文章。我有一种感觉,这些疑问是相互矛盾的!请问我该怎么修?代码如下 <?php query_posts( array( 'post_type' => array('event-', 'videos', 'videos-', 'audio', 'audio-'), 'posts_per_page' => 1, 'm

我一直试图在同一页上显示一篇特色文章和最新文章,但当我使用分页时,它在永久链接中显示/page/2,但它显示与第1页相同的文章。我有一种感觉,这些疑问是相互矛盾的!请问我该怎么修?代码如下

     <?php query_posts( array( 
     'post_type' => array('event-', 'videos', 'videos-', 'audio', 'audio-'), 
     'posts_per_page'  => 1,
     'meta_key'        => '_featured',
     'meta_value'      => 'yes'


      )); 
     ?>

      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

        <div class="potdpostcon">

            <div class="featuredimgpotd">
            <a href="<?php the_permalink() ?>"><div class="featuredpostimgzoom"></div><?php the_post_thumbnail( 'featured-post-home' ); ?></a>
            </div>

            <div class="featuredbasepotd">

                <div class="desclrgexcon"><span class="postexplrg"><a href="<?php the_permalink() ?>" class="postexplrg"><?php the_titlesmall('', '...', true, '82') ?></a></span></div>
                <div class="goiconlargecon"><a href="<?php the_permalink() ?>" class="fade"><img src="/wp-content/uploads/2014/06/goicon_lrg.png" /></a>

<?php endwhile; endif; ?>

第二次wp查询:

<?php

  $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;

  $args = array(
    'post_type' => array( 'post', 'videos', 'videos-', 'audio-', 'event-'),
    'showposts' => 80,
    'paged' => $paged
  );

  $wp_query = new WP_Query( $args );

  if ( have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post();?>


      <?php
if( $current_date != get_the_date('d-m-Y') ){
    echo '<div class="datetitle100spc"><div class="datetitleconspc"></div></div><div class="datetitle100"><div class="datetitlecon"><span class="dateheadertitle">'.get_the_date('l dS / M Y').'</span></div></div>';
    $current_date = get_the_date('d-m-Y');
}
?>


<div class="postmainbase">
<div class="postexcon">
                    <div class="featuredimgexcon"><a href="<?php the_permalink() ?>"><div class="postcategoryex"><div class="postcategorytitle"><span class="catexsmall"><?php $category = get_the_category(); echo $category[0]->cat_name; ?></span></div></div><div class="featuredimgzoom"></div><?php the_post_thumbnail( 'home-posts' ); ?></a></div>
                    <div class="sepexcon"></div>
                    <div class="descexcon"><span class="postexp"><a href="<?php the_permalink() ?>" class="postexp"><?php the_titlesmall('', '...', true, '92') ?></a></span></div>
                    <div class="goexcon"><a href="<?php the_permalink() ?>" class="fade"><img src="/wp-content/uploads/2014/06/goicon.png" /></a></div>
                </div>
</div>






            <?php endwhile; ?>

  <div class="paginationdiv">
<?php wp_pagenavi(); ?>
  </div>

     <?php endif; ?>


我感觉这里有一个post数据重置问题,不确定,有人能确认吗?是的。。您应该在第一次查询之后重置wp_查询。在这里阅读更多信息:这非常有效,谢谢,在普通页面上可以正常工作,但在有分页的索引页面上不行。。如果我点击第2页,它会在url中显示,但不会移动页面。。有什么建议吗?谢谢