When a WordPress Load More button begins showing posts from the wrong category, the problem may involve AJAX state, URL parameters, caching, or generated CSS rather than the category assignments themselves. In this case, the issue could not be reproduced consistently, even in BrowserStack and incognito testing. As a preventive mitigation, the Divi Filter Grid module was configured to force AJAX and URL parameters during Load More requests, while WP Rocket’s Remove Unused CSS feature was disabled for a separate pagination-alignment concern.
Issue background
A WordPress blog used Divi Filter Grid to let visitors select a category and then load additional posts without leaving the page.
The reported behavior occurred after a visitor selected a specific category and clicked Load More several times. On the third request, posts from another category appeared in the grid.
A separate visual concern involved previous and next pagination controls that sometimes appeared misaligned.
Because both symptoms were intermittent, the investigation needed to consider:
- Divi Filter Grid AJAX behavior
- Category state between Load More requests
- URL parameters
- Browser and page caching
- WP Rocket CSS optimization
- Recent plugin changes
Diagnosis
The cross-category issue could not be reproduced consistently during development testing. It did not recur reliably in BrowserStack or other controlled browser sessions.
That meant the task did not support a definitive claim that one plugin, query, or cache layer caused the problem.
The strongest working theory was that the Load More request was not consistently preserving the active category state. If the AJAX request did not carry the selected filter or URL parameters forward, later requests could fall back to a broader post query.
Recent plugin changes were reviewed as possible contributors, including a newly added custom helper plugin. However, no direct conflict was confirmed.
The pagination-alignment issue also could not be reproduced reliably. Because WP Rocket’s Remove Unused CSS feature can occasionally omit or delay rules needed by dynamic components, that setting was disabled as a precaution.
Resolution steps
- Reproduce the exact visitor sequence. Select the affected category and click Load More repeatedly, using the same browser state described in the report.
- Test in private and normal sessions. Compare incognito behavior with a regular browser profile that contains existing cookies and cached assets.
- Inspect the Load More network requests. Verify that each AJAX request includes the active category and any required query parameters.
- Review Divi Filter Grid settings. Confirm that AJAX loading is enabled and that URL parameters are preserved during repeated Load More actions.
- Force AJAX and URL parameters. Configure the module so later requests continue using the same filtered query state.
- Compare returned post IDs. Confirm that each batch belongs to the selected category and that no broad fallback query is being used.
- Review recent custom code. Check helper plugins, child-theme functions, and query filters for hooks that alter archive or AJAX queries.
- Test after disabling likely conflicts. Use a staging or restored environment to compare behavior before and after recent plugin changes.
- Review cache behavior. Clear WordPress, hosting, CDN, WP Rocket, and browser caches before retesting.
- Inspect pagination CSS separately. Do not assume the category-loading issue and button-alignment issue share the same cause.
- Disable Remove Unused CSS as a test. Turn off the WP Rocket feature when dynamic pagination controls appear to lose required styling.
- Retest at several screen sizes. Check desktop, tablet, and mobile layouts for both filtering and pagination alignment.
- Document the mitigation accurately. When an issue cannot be reproduced, record the preventive changes without presenting them as a confirmed root-cause repair.
The important debugging principle is to inspect the actual AJAX request rather than only the visible grid. A category filter can appear correct on screen while later requests omit the state that produced the first result set.
Final outcome
The Divi Filter Grid module was updated to force AJAX and URL parameters during Load More actions. This was intended to keep the selected category attached to every subsequent request.
WP Rocket’s Remove Unused CSS feature was also disabled because it was a plausible contributor to the separate previous and next button alignment issue.
The original cross-category behavior was not reproduced consistently, so the task was closed after these preventive changes rather than after a confirmed root cause was isolated.
The key lesson is that intermittent filtering problems require careful distinction between a confirmed fix and a mitigation. Preserving filter state in AJAX requests and reducing risky CSS optimization are reasonable safeguards, but the final documentation should reflect the evidence actually observed.
For help troubleshooting Divi Filter Grid, WordPress AJAX filtering, or WP Rocket compatibility issues, contact Freshy.