Customizing woocommerce reviews pagination query

696 Views Asked by At

We have built a website for a company that use to be on a custom build PHP website. It had star ratings completely independent of the Reviews.

A third party managed to import the reviews into the WC reviews, and had empty comments_content fields. Fine. The guys that did it managed to make the Reviews tab shown only those where comments_content is not empty. Bingo.

Now tho, we need to turn on the new reviews as they come in, but we know it will make the page very long. It's a busy site, so could get 50-100 comments per new product inside a few days.

So on our staging area site, I turned on Pagination. Perfect. BUT... this is counting ALL comments, even the comments_content that is empty (from the star ratings).

I know a little about adding functions to the child theme functions.php file, but nothing about how to find the pagination query within Wordpress, and to make a query to make it show where comments_content != ''.

It's using Wordpress 4.8.1, and is on NGINX.

Hope someone can maybe help. I did also look at CSS, but obviously that is only going to style it. It has to be a setting in the Query somewhere.

I also wondered if the query for pagination is the same as another query, but the rest of the Reviews feature works fine.

0

There are 0 best solutions below