How to do the pagination control on Wordporess?

Want to make the pagination control when choosing rubrics. (cx80363-wordpress.tw1.ru/category/toys/)
Exemplary code category.php:

<?php query_posts(array(
'cat' =--> 1,
'paged' => 1,
'post_per_page' => '1'
));

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


Itself the navigation page displays, but when you try to go nothing happens.
What am I doing wrong?
WP 4.9.2
Pattern hand
June 8th 19 at 17:30
1 answer
June 8th 19 at 17:32
Solution
In the end, decided to get a page number by means of WP.
Code like this:
<?php $pageNum=(get_query_var('paged')) ? get_query_var('paged') : 1; //get current page

query_posts(array(
 'cat' =--> get_cat_ID($cat_title),
 'paged' => $pageNum, //pass current page
 'post_per_page' => 1
));

 if ( have_posts() ) :
 while ( have_posts() ) : the_post(); ?>
 /* posts */
 <?php endwhile;
the_posts_pagination();
 else :
 endif; ?>

Find more questions by tags WordPress