How to fix broken map displays and layout issues caused by WP Rocket and WYSIWYG content in WordPress

When interactive elements like maps or page layouts suddenly break in WordPress—especially after plugin or theme updates—the root cause is often tied to performance optimizations or improperly formatted content.

In this case, a site experienced multiple issues at once:

  • A map carousel (Progress Maps plugin) breaking for logged-out users
  • Missing location data (addresses not displaying)
  • Layout issues in long-form bio content (text misaligned to the left)

The solution involved identifying conflicts with WP Rocket optimization settings and cleaning up malformed HTML inside the WordPress editor.

Issue Background

The site had recently:

  • Added a new office location
  • Updated several plugins and themes, including:
    • Divi theme
    • ACF Pro
    • WP Rocket
    • Progress Maps plugin

Shortly after, several issues appeared:

  • Map carousel displayed incorrectly (black lines, broken layout)
  • Maps worked while logged in but failed in incognito
  • Address data below maps disappeared
  • Bio pages showed broken formatting with text shifted incorrectly

These symptoms pointed to a mix of frontend asset loading issues (JS/CSS) and content formatting problems inside the editor.

Diagnosis

WP Rocket optimization conflict

The key issue affecting the map was WP Rocket settings:

  • Remove Unused CSS
  • Defer All JavaScript

These optimizations were stripping or delaying scripts required by:

  • Progress Maps plugin
  • Google Maps API

This caused maps to break for logged-out users due to cached and optimized assets.

Plugin and update interactions

Recent updates increased the likelihood of conflicts:

  • Divi theme update
  • ACF Pro
  • WP Rocket cache toggles

These changes can alter script loading order, CSS rendering, and template output.

WYSIWYG editor content issues

The bio layout issue was caused by raw HTML pasted into the WordPress editor, likely from an external source. This resulted in broken paragraph structure and misaligned content.

Resolution Steps

Step 1: Fix WP Rocket conflicts with map plugins

Navigate to WP Rocket → File Optimization and adjust settings.

Exclude JavaScript from deferral:

maps.googleapis.com
progress-maps

Exclude CSS from removal:

  • Disable “Remove Unused CSS” temporarily or
  • Add exclusions for map-related styles

Clear all caches after making changes.

Step 2: Test logged-out behavior

Always verify changes in an incognito window to ensure cached users see the correct result.

Step 3: Clean WYSIWYG content

Open the page in the editor and remove any malformed HTML. Paste content as plain text using Ctrl+Shift+V to avoid formatting issues.

Step 4: Validate ACF fields

Ensure custom fields are still populated and correctly referenced in templates after updates.

Step 5: Re-enable optimizations carefully

Turn features back on gradually and test each change to avoid reintroducing conflicts.

Final Outcome

After applying these fixes:

  • Map carousel functionality was restored
  • Google Maps and Progress Maps loaded correctly
  • Address data displayed properly
  • Bio layout issues were resolved
  • WP Rocket optimizations remained enabled with exclusions

Need help troubleshooting WordPress plugin conflicts? Contact Freshy to get expert support.