When creating a filterable grid, you typically expect that clicking on a filter link will simply show or hide entries based on the selected filter. However, if the page refreshes upon clicking, this indicates an error. This article will help you understand why this happens and how to troubleshoot and resolve the issue.
This issue often arises because an external JavaScript event is listening for clicks on your site and is overriding the theme’s default behavior. As a result, the link’s click action doesn’t function as expected. The most common cause is an improperly configured Google Tag Manager (GTM) script.
To troubleshoot, start by checking if your site is using Google Tag Manager. If it is, temporarily disable GTM and re-test the filter. If the issue is resolved, you’ll need to adjust your GTM settings to prevent conflicts. If the problem persists, the next step is to:
- Try disabling plugins 1 by 1 to see if any plugin is conflicting.
- If you are using a child theme, try switching to the parent theme and see if it works.
- And if you still have issues then please reach out for support.