• Resolved LillaLisa

    (@lillalisa)


    Hi!

    I′ve tried to remove the sorting drop-down from my shop page but it′s not working.
    I went to to Appearance > Editor > Theme Functions (functions.php) and pasted the following code into the functions.php file:
    remove_action( ‘woocommerce_before_shop_loop’, ‘woocommerce_catalog_ordering’, 30 );

    But nothing happened… Did I do anything wrong? How can I get rid of the sorting drop-down?

    Best regards,
    Lisa

    https://www.ads-software.com/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • remove_action has to use the same hook and the same priority as the corresponding add_action. This can vary between themes, so what works for one may not work for another. To make it harder, some themes may not use the hook method.

    Please post the url for your site. If you are using a free theme I may be able to try it. Alternatively it may be possible to hide the drop-down with css.

    Thread Starter LillaLisa

    (@lillalisa)

    Thanks for your answer, lorro!

    The url is https://lia-design.se/ and the one for the webshop is https://lia-design.se/shop/

    I don’t think virtue uses the hook method, so either you need make a child theme and create a modified page template, or much easier, try this custom css in Appearance > Theme Options > Advanced Settings:

    .woocommerce-ordering {display:none}

    Thread Starter LillaLisa

    (@lillalisa)

    Adding .woocommerce-ordering {display:none} did the trick!

    Thank you very, very much, lorro!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems with removing the sorting drop-down’ is closed to new replies.