Answer the question
In order to leave comments, you need to log in
Why is pagination not showing up in the WooCommerce product catalog?
Greetings.
There is a website: kondimaster.ru
And the problem is that pagination is not displayed on the product page of any category, let's say in this one: http://kondimaster.ru/product-category/%d1%83%d0%b...
There is no pagination, and only 12 products are displayed. What is the problem?
I post the code:
archive-product.php:
get_header( 'shop' ); ?>
<div class="content">
<div class="header_wrap">
<div class="header_wrap_container">
<div class="row paddingbot15"> <!-- Catalog wraper -->
<div class="col-lg-3 col-md-3 col-sm-3 hidden-xs nopadding">
<div class="catalog">
<?php dynamic_sidebar( 'Footer 4' ); ?>
</div>
<?php get_sidebar('tagcloud'); ?>
<?php get_sidebar('feedback'); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 nopaddingright nopaddingmobile">
<div class="goods_wrap">
<?php
/**
* woocommerce_before_main_content hook.
*
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action( 'woocommerce_before_main_content' );
?>
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
<?php endif; ?>
<?php
/**
* woocommerce_archive_description hook.
*
* @hooked woocommerce_taxonomy_archive_description - 10
* @hooked woocommerce_product_archive_description - 10
*/
do_action( 'woocommerce_archive_description' );
?>
<?php if ( have_posts() ) : ?>
<?php woocommerce_product_loop_start(); ?>
<?php woocommerce_product_subcategories(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php wc_get_template_part( 'content', 'product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php woocommerce_product_loop_end(); ?>
<?php
/**
* woocommerce_after_shop_loop hook.
*
* @hooked woocommerce_pagination - 10
*/
do_action( 'woocommerce_after_shop_loop' );
?>
<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
<?php wc_get_template( 'loop/no-products-found.php' ); ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_footer( 'shop' ); ?>
<nav class="woocommerce-pagination">
<?php
echo paginate_links( apply_filters( 'woocommerce_pagination_args', array(
'base' => esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) ),
'format' => '',
'add_args' => false,
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $wp_query->max_num_pages,
'prev_text' => '←',
'next_text' => '→',
'type' => 'list',
'end_size' => 3,
'mid_size' => 3
) ) );
?>
</nav>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question