Page 2 未加载页面导航 wordpress


Page 2 isnt loading page navi wordpress

我已经设置了一个查询,以按日期每页查询 80 个帖子,但它没有为我加载第 2 页。它总是说404错误。我真的不知道我哪里出错了。这是代码。

  <div class="mainvideoscon">
  <div class="videosallcenter">
            <?php
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    $args = array(
        'post_type' => array('post','video', 'featured', 'spotlight'),
        'paged' => $paged
   );
    $wp_query = new WP_Query($args);
    if (have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
    if ($current_date != get_the_date('d-m-Y')) {
        echo '<div class="datetitlecon"><header class="datetitleh"><span class="datetitlehb"><i class="fa fa-clock-o"></i>&nbsp;' . get_the_date('l ') . '</span>';
        echo '' . get_the_date('dS M Y') . '</header></div>';
        $current_date = get_the_date('d-m-Y');
    }
    ?>
    <div class="mvideocontv">
        <a href="<?php the_permalink() ?>"><div class="mvideocontvfi">
            <div class="gopostitem">
            <?php
                                        $posttype = get_post_type(get_the_ID());
                                        if ($posttype == "post") {
                                            echo '<img src="/wp-content/themes/justlooktv/images/gonews.png">';
                                        }
                                        if ($posttype == "video") {
                                            echo '<img src="/wp-content/themes/justlooktv/images/play.png">';
                                        }
                                        if ($posttype == "spotlight") {
                                            echo '<img src="/wp-content/themes/justlooktv/images/play.png">';
                                        }
                                        if ($posttype == "featured") {
                                            echo '<img src="/wp-content/themes/justlooktv/images/play.png">';
                                        }
                                        ?>
            </div>
            <div class="featuredimgblg"><?php the_post_thumbnail( 'ftimg-home' ); ?></div>
            <?php if ('in_stock' == get_field('show_youtube_video')) { ?>  
            <img src="https://i.ytimg.com/vi/<?php the_field('youtube_video_id'); ?>/mqdefault.jpg" >
           <?php } ?>
        </div></a>
        <div class="mvideodesccontv">
        <div class="ppw"></div>
        <a href="<?php the_permalink() ?>"><?php short_title('...', 58); ?></a>
        </div>
        </div>
    <?php endwhile; ?>
  </div>
  <div class="paginationcon">
    <div class="paginationfocus">
  <?php wp_pagenavi(); ?>
    </div>
  </div>

            <?php endif; ?>
    <?php wp_reset_query(); ?> 

提前感谢您的帮助

尝试用这个变量替换你的$arg变量。

$args = array (
    'post_type'              => array('post','video', 'featured', 'spotlight'),,
    'post_status'            => 'publish',
    'pagination'             => true,
    'posts_per_page'         => '80',
);