Skip Navigation

Pagination displaying twice on Archives

Won't fix

Reported for: Toolset WooCommerce Blocks 2.7.4

Symptoms

When you design WordPress Archives with Toolset and add pagination to the archive, you might see the pagination controls displaying twice on the front-end.

There are one pagination controls generated by Toolset, and another one by either the theme or WooCommerce if it is a Shop Archive.

Workaround

You either can remove the pagination created using Toolset, or you can remove the pagination that your theme, or WooCommerce (in the case of a Shop Archive), produce.

Note that if you have Toolset Layouts active, you will not need to remove the WooCommerce pagination, because this is already done by Layouts in this case.

In all other cases, you can use filters similar to the following, to remove WooCommerce pagination:
remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 );

Alternatively, you can use CSS to hide it, like this:
.woocommerce-pagination {
display:none;
}

To remove pagination coming from a theme, you usually need to create a child theme and create a new archive template where you do not call the pagination.

For example, in the Twenty Twenty theme, the pagination is added to templates by get_template_part( ‘template-parts/pagination’ );. If you remove this from the archive templates you will avoid the duplicate pagination.

Leave
a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>