<ul class="products">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 12
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post();
wc_get_template_part( 'content', 'product' );
endwhile;
} else {
echo __( 'No products found' );
}
wp_reset_postdata();
?>
</ul><!–/.products–>
<nav class="navigation pagination" role="navigation">
<h2 class="screen-reader-text">Навигация по записям</h2>
<div class="nav-links"><span class="page-numbers current"><span class="meta-nav screen-reader-text">Страница </span>1</span>
<a class="page-numbers" href="http://wptest.ru/page/2/"><span class="meta-nav screen-reader-text">Страница </span>2</a>
<span class="page-numbers dots">…</span>
<a class="page-numbers" href="http://wptest.ru/page/86/"><span class="meta-nav screen-reader-text">Страница </span>86</a>
<a class="page-numbers" href="http://wptest.ru/page/87/"><span class="meta-nav screen-reader-text">Страница </span>87</a>
<a class="next page-numbers" href="http://wptest.ru/page/2/">Следующая страница</a>
</div>
</nav>
<form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div>
<label class="screen-reader-text" for="s"><?php _x( 'Search for:', 'label' ); ?></label>
<input type="text" value="<?php echo get_search_query(); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'Search', 'submit button' ); ?>" />
</div>
</form>