woocommerce pagination not working

10.5k Views Asked by At

On my locally hosted site is the woocommerce pagination not working properly. When I use http://localhost/sample-post/ the second page is a wrong one. I'm landing on an attachment page instead of the second product page.

When using http://localhost/?p=123 it works ok. Anyone an idea?

Is it because I'm working locally and will it not be on a remote server? I've read something about that. Need confirmation.

EDIT

Went worse..... I have to translate the site in different languages using WPML. When using the default permalinks WPML complains. When using another structure (see above) and in WPML the setting for a different folder for each language I got pages with no result (except for a message from woocommerce that no products were found.

EDIT 2, February 18th, 2015

I start to wonder if it is even possible to set the WooCommerce shop page as the Front page. The support team of WooCommerce is puzzled as well and are wondering too if it is possible. I hope someone has experience with it or an example of a site on which it works.

Please, can anyone help me out here... I'm struggling now for a long time and I'm not able to solve this myself.

2

There are 2 best solutions below

0
On

Please use this function for correct woocommerce pagination. please use this function inside the function.php

add_filter( 'woocommerce_pagination_args',  'rocket_woo_pagination' );
function rocket_woo_pagination( $args ) {
  $args['prev_text'] = '<i class="fa fa-angle-left"></i>';
  $args['next_text'] = '<i class="fa fa-angle-right"></i>';
  return $args;
}
2
On

your permalinks settings need adjusting. in wp-admin go to settings>permalinks>common settings, and set "per post." check your product permalink base as well.