I'm experiencing a problem with the following piece code:
global $wp_query; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $filter_args['paged'] = $paged; $filter_args['posts_per_page'] = 2; $args = array_merge( $wp_query->query_vars, $filter_args ); query_posts( $args );
This code is located at archive-prodcut.php file, inside of my theme/woocommerce folder.
It works correctly in order to show first 2 products and also to show WooCommerce pagination on the bottom.
do_action( 'woocommerce_after_shop_loop' );
However, when I click on each of the pages I'm getting a "Not found" error. When I tried putting an echo on the top of the archive-prodcut.php file I realized that it doesn't load. The url looks like www.site.com/product-category/cat-name/page/2
Thanks in advance!