Skip to main content

Remove Code From Specific Pages

What it does

Remove scripts and styles that are not needed on a specific page. Removing the wrong handle can break that page only.

This is not a Nitro Settings sidebar section. You set it per page.

Where to find it

  • Frontend Asset Helper (admin bar) to discover handles — enable it under Minify
  • WordPress editor meta box Remove Scripts
  • Divi 4 Visual Builder page settings (when Divi 5 is not active)
  • Divi 5 Visual Builder page settings (same JS/CSS handle lists)

Settings (per page)

SettingTypeDefaultWhat it does
JS files to remove / Remove JS handlesTextemptyComma-separated script handles to dequeue on this page
CSS files to remove / Remove CSS handlesTextemptyComma-separated style handles to dequeue on this page

WordPress editor workflow

  1. Enable the Frontend Asset Helper in Nitro minify settings.
  2. Visit the page on the front end and open the helper from the admin bar.
  3. Copy the handles you want to remove.
  4. Edit the page in WordPress and paste handles into JS files to remove and/or CSS files to remove.
  5. Update and verify with the helper that those files no longer load.

Copy handles from the helper

Divi 4 Visual Builder workflow

  1. Open the page in the Divi 4 builder.
  2. Open page settings and find the Divi Nitro fields for Remove JS handles and Remove CSS handles.
  3. Paste the same handles you identified with the helper.
  4. Save and view the front end.

Divi 5 Visual Builder workflow

  1. Open the page in the Divi 5 Visual Builder.
  2. Open Divi Nitro page settings for removing scripts and styles.
  3. Add the handles, save, and confirm on the front end.
warning

Test after every change. Prefer removing unused third-party assets — not core Divi or Divi Engine handles required on that page.

What's Next