To remove pagination from WooCommerce pages in the Storefront theme, you can use custom CSS or modify the template files directly. Here are two approaches:
You can hide the pagination using CSS by targeting the appropriate CSS class or ID. Typically, WooCommerce uses .woocommerce-pagination for pagination elements. Add the following CSS to your theme's custom CSS area:
.woocommerce-pagination { display: none; } If you want to completely remove the pagination functionality from WooCommerce pages, you can modify the template files directly. However, this approach is less recommended as it involves modifying core files which may get overwritten during theme updates. Here's how you can do it:
Copy the pagination.php file from the WooCommerce plugin directory (wp-content/plugins/woocommerce/templates/loop/pagination.php) to your child theme directory (wp-content/themes/your-child-theme/woocommerce/loop/pagination.php).
Edit the copied pagination.php file and remove all the contents. Save the file.
By removing the contents of pagination.php, you effectively disable pagination for WooCommerce pages. However, keep in mind that this method is not recommended because it modifies core WooCommerce files, which may lead to issues during updates.
"woocommerce storefront theme remove pagination"
functions.php file:function remove_storefront_pagination() { remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 ); } add_action( 'init', 'remove_storefront_pagination' ); "wordpress storefront theme disable pagination on shop page"
functions.php file:function disable_pagination_on_shop_page() { if ( is_shop() ) { remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 ); } } add_action( 'template_redirect', 'disable_pagination_on_shop_page' ); "woocommerce storefront theme hide pagination"
functions.php file:add_action( 'wp_head', function() { echo '<style>.woocommerce-pagination { display: none; }</style>'; }); "wordpress remove pagination from woocommerce shop page"
functions.php file:function remove_pagination_from_shop_page() { if ( is_shop() ) { remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); } } add_action( 'template_redirect', 'remove_pagination_from_shop_page' ); "woocommerce storefront theme show all products on one page"
functions.php file:function show_all_products_on_one_page( $query ) { if ( $query->is_main_query() && ! is_admin() && is_shop() ) { $query->set( 'posts_per_page', -1 ); } } add_action( 'pre_get_posts', 'show_all_products_on_one_page' ); "wordpress storefront theme remove pagination on product archive"
functions.php file:function remove_pagination_on_product_archive() { if ( is_post_type_archive( 'product' ) ) { remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 ); } } add_action( 'template_redirect', 'remove_pagination_on_product_archive' ); "woocommerce storefront theme no pagination"
functions.php file:remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 );
"wordpress storefront theme display all products without pagination"
functions.php file:function display_all_products_without_pagination() { remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); } add_action( 'init', 'display_all_products_without_pagination' ); "remove pagination from woocommerce storefront theme"
functions.php file:remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 );
"wordpress storefront theme disable pagination on product page"
functions.php file:function disable_pagination_on_product_page() { if ( is_product() ) { remove_action( 'woocommerce_after_shop_loop', 'storefront_pagination', 30 ); } } add_action( 'template_redirect', 'disable_pagination_on_product_page' ); java-annotations arrow-functions tmx division request http-status-code-410 control-flow ibm-mq public-key hierarchical-clustering