Scroll after filter ?
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from patH on May 19, 2026, 15:51Hi there.
I am now using the Premium version which is great.
On my Category of products page I am usign the filter but I need a little scroll down after click on Filter buton.
https://boutique.ramscores.com/categorie-produit/formations/I have no idea how to do, I tried some code in « JavaScript code after AJAX is done » but no result...
Any help is appreciated.Thanks.
Hi there.
I am now using the Premium version which is great.
On my Category of products page I am usign the filter but I need a little scroll down after click on Filter buton.
https://boutique.ramscores.com/categorie-produit/formations/
I have no idea how to do, I tried some code in « JavaScript code after AJAX is done » but no result...
Any help is appreciated.
Thanks.
Quote from Alex Dovlatov on May 20, 2026, 12:38Hello, and thank you!
The "JavaScript code after AJAX is done" field will not help here because your setup uses redirect mode, not AJAX — the URL after filtering shows ?swoof=1&pa_instrumentation=... which means the page is fully reloaded on each filter click. There is no AJAX event happening, so that hook simply never fires. Redirect mode is a perfectly valid choice (in many cases it is actually more reliable than AJAX), we just need a different approach for the scroll.
The clean solution is a small PHP snippet that runs only when a HUSKY filter is active, detected via the built-in is_woof_search_going() helper, and injects a tiny scroll script into the page footer. It uses the native scrollIntoView with smooth behavior, targeting your products container which has the id "produits" on your site.
Add the following to your child theme functions.php or to any custom snippets plugin:
add_action('wp_footer', function () { if (function_exists('is_woof_search_going') AND is_woof_search_going()) { ?> <script> document.addEventListener('DOMContentLoaded', function () { var target = document.getElementById('produits'); if (target) { target.scrollIntoView({behavior: 'smooth', block: 'start'}); } }); </script> <?php } });How it works:
The hook runs on every page, but the inner JavaScript is printed only when is_woof_search_going() returns true, meaning the user has just applied a filter. On all other page loads nothing is added, so there is no overhead and no side effects on regular browsing.
When the filter is active, the page reloads with the new product list and the script smoothly scrolls to the element with id "produits", which is the products container on your category page.
If you want to leave a small gap above the products (for a sticky header for example), you can replace the scrollIntoView call with a manual offset:
var top = target.getBoundingClientRect().top + window.pageYOffset - 100; window.scrollTo({ top: top, behavior: 'smooth' });
Save, clear any caching plugin, and test by applying a filter on the category page.
Let me know if it works for you.
Hello, and thank you!
The"JavaScript code after AJAX is done" field will not help here because your setup uses redirect mode, not AJAX — the URL after filtering shows ?swoof=1&pa_instrumentation=... which means the page is fully reloaded on each filter click. There is no AJAX event happening, so that hook simply never fires. Redirect mode is a perfectly valid choice (in many cases it is actually more reliable than AJAX), we just need a different approach for the scroll.
The clean solution is a small PHP snippet that runs only when a HUSKY filter is active, detected via the built-in is_woof_search_going() helper, and injects a tiny scroll script into the page footer. It uses the native scrollIntoView with smooth behavior, targeting your products container which has the id"produits" on your site.
Add the following to your child theme functions.php or to any custom snippets plugin:
add_action('wp_footer', function () {
if (function_exists('is_woof_search_going') AND is_woof_search_going()) {
?> <script>
document.addEventListener('DOMContentLoaded', function () {
var target = document.getElementById('produits');
if (target) {
target.scrollIntoView({behavior: 'smooth', block: 'start'});
}
});
</script>
<?php
}
});How it works:
The hook runs on every page, but the inner JavaScript is printed only when is_woof_search_going() returns true, meaning the user has just applied a filter. On all other page loads nothing is added, so there is no overhead and no side effects on regular browsing.
When the filter is active, the page reloads with the new product list and the script smoothly scrolls to the element with id"produits", which is the products container on your category page.
If you want to leave a small gap above the products (for a sticky header for example), you can replace the scrollIntoView call with a manual offset:
var top = target.getBoundingClientRect().top + window.pageYOffset - 100; window.scrollTo({ top: top, behavior: 'smooth' });
Save, clear any caching plugin, and test by applying a filter on the category page.
Let me know if it works for you.
Quote from patH on May 20, 2026, 16:10Thanks a lot @alexdev for your help.
I just changed the instructionif (target) { target.scrollIntoView({behavior: 'smooth', block: 'start'}); }with
if (target) { var top = target.getBoundingClientRect().top + window.pageYOffset - 100; window.scrollTo({ top: top, behavior: 'smooth' }); }and it works great !
Thanks a lot @alexdev for your help.
I just changed the instruction
if (target) {
target.scrollIntoView({behavior: 'smooth', block: 'start'});
}
with
if (target) {
var top = target.getBoundingClientRect().top + window.pageYOffset - 100; window.scrollTo({ top: top, behavior: 'smooth' });
}and it works great !
Quote from Alex Dovlatov on May 21, 2026, 22:42You are Welcome!
You are Welcome!
