• Resolved piotrpepson

    (@piotrpepson)


    Good people please help.

    Sorting option do not work with Woo product gallery. see and try to sort: https://zapodaj.net/plik-haDRxKTg8E

    I cant resolve this issue, I cant add any sorting option for thisproduct gallery, search option is working, but no other filters or sorting seems to work.

    I have added short code, but it not working, products are refreshed after clicking sort option, but nothing change in the product results, they are not sorted.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @piotrpepson,

    Thank you for contacting WooCommerce support. I understand you are having trouble with the sorting option for your product gallery.

    I checked your site and I can see the error message in your functions.php file(// functions.php function custom_product_tag_filter_shortcode() { ob_start(); ?>). It seems that you are using a custom shortcode to display the product gallery, but it is missing some parameters that are required for the sorting to work properly.

    To fix this issue, you need to add the following parameters to your shortcode:

    • orderby: This determines how the products are ordered. You can use values like date, price, popularity, rating, etc. For example, orderby="price" will sort the products by price.
    • order: This determines the order direction. You can use values like ASC (ascending) or DESC (descending). For example, order="ASC" will sort the products from low to high.
    • paginate: This determines whether to enable pagination or not. You can use values like true or false. For example, paginate="true" will enable pagination for the product gallery.

    You can find more information about the shortcode parameters here: WooCommerce Shortcodes

    So, your shortcode should look something like this:

    [products category="your-category-slug" orderby="price" order="ASC" paginate="true"]

    Please try this and let us know if it works for you. If you still face any issues, please reply to this thread with more details and I will be happy to assist you further.

Viewing 1 replies (of 1 total)
  • The topic ‘Sorting option do not work with Woo product gallery’ is closed to new replies.