WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » Add a reset filter button in layered widget

Add a reset filter button in layered widget

Viewing 2 replies - 1 through 2 (of 2 total)
  • i’m using this code:

    add_action('woocommerce_layered_nav_link', 'your_function_name');
    
    function your_function_name() {
    // Your code
    
    $filterreset = $_SERVER['REQUEST_URI'];
    $filterreset = strtok($filterreset, '?');
    echo'<a href="'.$filterreset.'">Clear Filters</a>';
    
    }

    but is adding a link on every element inside the widget.

    P.S. sorry for my english!

    Hi there,

    I am looking for the same functionality. Anyone?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add a reset filter button in layered widget’ is closed to new replies.
Skip to toolbar