WordPress нумерация страниц ничего не показывает - PullRequest
0 голосов
/ 24 февраля 2019

Я создаю нумерацию страниц, используя the_posts_pagination, но она ничего не показывает, никаких ошибок не происходит.Я делюсь кодом здесь.

PHP

<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args10 = array(
'post_type' => 'post',
'posts_per_page' => 5,
'paged' => $paged,
'post_status' => 'publish',
'tax_query' => array(
 array(
   'taxonomy' => 'category',
   'field' => 'term_id',
   'terms' => array(6,4,14)
    )
 )
);
$query10=new WP_Query($args10);?>
<?php if ($query10->have_posts()) : while ($query10->have_posts()) : $query10->the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php echo get_the_title(); ?></a>
<?php echo get_the_excerpt(); ?>
<?php echo get_the_date(); ?>
<?php $category = get_the_category(); echo $title = $category[0]->cat_name; ?>
<?php endwhile; endif; wp_reset_query(); ?>
<?php the_posts_pagination( array(
    'show_all' => true
) ); ?>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...