<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'posts_per_page' => 6,
'order' => 'DESC',
'post_type' => 'product',
'paged' => $paged
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) :
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php the_title(); ?>
<?php endwhile;
endif; ?>
<?php
$GLOBALS['wp_query']->max_num_pages = $loop->max_num_pages;
the_posts_pagination(array(
'type'=>'inline',
'screen_reader_text' => __( '' ),
'end_size' => 1,
'mid_size' => 1,
'prev_next' => True,
'prev_text' => __(''),
'next_text' => __(''),
'add_args' => False
));
?>
<?php wp_reset_postdata(); ?>
the_title() - вывод заголовка
the_date() - дата
print_r, var_dump так же