To resolve the issue with infinite scroll not working when caching is enabled, you can try the following steps:
- Exclude URLs from Cache: Ensure that the URLs related to infinite scroll are excluded from caching. Since you tried adding
/shop without success, you can try a more specific pattern if your infinite scroll feature uses different URLs.
- Go to WP Admin Panel > WP-Optimize > Cache > Advanced Settings.
- In the “List URLs that should not be cached” field, add more specific paths. For example, if the infinite scroll affects multiple pages, you can use patterns like
/shop/* or more specific paths relevant to your infinite scroll setup.
- Check JavaScript Exclusion: Sometimes, JavaScript files required for infinite scroll might be cached, causing the feature to break. Ensure these scripts are not cached.
- Go to WP-Optimize > Cache > Advanced Settings.
- Add the specific scripts to the “Never minify the following JavaScript files” field if minification is enabled.
- Adjust Lazy Load Settings: If you have lazy loading enabled, it might interfere with infinite scroll.
- Go to WP Admin Panel > WP-Optimize > Images > Lazy Load Images.
- Ensure that the settings for lazy loading do not conflict with the infinite scroll feature.
- Debugging Cache Issues: To pinpoint why caching interferes with infinite scroll, enable WP_DEBUG in your
wp-config.php file.
- Add
define('WP_DEBUG', true); to your wp-config.php.
- Check the debug log for any errors related to infinite scroll when caching is enabled.
If none of these steps resolve the issue, you might need to consider custom caching rules or adjustments specific to your theme and plugin setup.