0

I use ACF Pro to create a customized comments section with additional fields to my custom post type called Products (it's a simple page with a custom comment section, NOT using WooCommerce).

Now visitors to the website can comment by adding a place where you can buy the product. You can add an image, name, price, link, and country for each product, and it works great.

How it looks, (please ignre the random data inside, just for testing purpose): https://ibb.co/zh0rWf9

What I want is to be able to sort or filter those comments, by adding a select form with options that will make users able to sort the comments by the country field. If they select the UK option in select form, then the first comments should be the ones containing 'UK' in the country field.

Can anybody help me with this?

Much appreciated!

1
  • Welcome to the WordPress DEvelopment Stack exchange. We focus on WordPress development here rather than the support of third-party plugins. You might find better help on the AFC Pro support page. If you have not done so yet, consider checking out the tour and help center to find out how things work here. Mar 13, 2021 at 9:53

1 Answer 1

0

I would use an url parameter to define which products are shown, and update the page contents either by javascript or php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.