Scroll to the top after selecting a filter value

FiboFilters provides an option to automatically scroll to the top of the product grid after selecting a filter. By default, this feature is disabled. To enable it, follow these steps:

  1. Navigate to WooCommerce > FiboFilters > Appearance.
  2. Locate the “Scroll to the top after selecting a filter value” setting and enable it:
FiboFilters: scroll to the top after selecting a filter value

Once enabled, FiboFilters will scroll the page 200px above the product grid. You can adjust this offset for mobile and desktop devices separately using the following filters:

add_filter( 'fibofilters/config/scroll_top_offset_mobile', fn() => 100 );
add_filter( 'fibofilters/config/scroll_top_offset_desktop', fn() => 150 );

Learn how to add this snippet to your WordPress.

Adjust the pixel values as needed for your desired scroll offset.