• Resolved raha1988ab

    (@raha1988ab)


    Is there any option to change the default sorting of WooCommerce you changed to show it horizontally not like a drop-down menu? The reason I ask is, with google tag manager we crate the tag and add the data to analytics then we found that no one cared or nobody sees the default sorting of WooCommerce, on the other project we asked from developer to change it, after 2 weeks it shows us many of users clicked on them because it’s front of eyes and they can see and they can understand that. But it seems before that, they couldn’t see that.

    Example
    https://prnt.sc/Y4KCGiyODJrC

    default
    https://prnt.sc/kdZwm5wbuK-s

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • This element comes from a template, so you can override it.

    Copy
    wp-content/plugins/woocommerce/templates/loop/orderby.php
    to
    wp-content/themes/your-child-theme/woocommerce/loop/orderby.php

    If your theme has already customized this template, start with that.

    Edit the copy to remove the select and show a list instead. Some css will be needed to make it look good. PHP skills will be needed.

    The actual code is probably more that you could expect in a forum answer.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @raha1988ab

    Currently, WooCommerce displays the sorting options in a dropdown menu by default. However, it is indeed possible to change this to a horizontal layout, but it would require some custom coding.

    As @lorro explained, this process involves overriding the WooCommerce template file that handles the sorting options. The file is located in the WooCommerce plugin directory under “woocommerce/templates/loop/orderby.php”. You can copy this file to your theme’s WooCommerce folder and modify it there. This way, your changes won’t be overwritten when you update the WooCommerce plugin.

    Please note that this is a more advanced modification and may require the assistance of a developer if you are not comfortable with coding. Our WooCommerce community is brimming with skilled open-source developers who are active on the following channels:

    I hope this helps! If you have any other questions or need further assistance, please don’t hesitate to ask.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change default Sorting Style in woocommerce’ is closed to new replies.