# 404-solution/trunk/includes/html/themeRemoverScript.html

404 Solution, version trunk. 20 lines.

- Page: https://pluginprobe.com/plugins/404-solution/trunk/code/includes/html/themeRemoverScript.html
- Raw: https://pluginprobe.com/plugins/404-solution/trunk/raw/includes/html/themeRemoverScript.html
- Modified: 2025-11-20T14:18:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/404-solution/trunk/code/includes/html/themeRemoverScript.html#L10-L20`.

```html
<script type="text/javascript">
(function() {
  // Remove theme synchronously from html element to use default WordPress styling
  // This runs immediately when the script executes in <head>, before body is parsed
  document.documentElement.removeAttribute("data-theme");

  // Also remove from body for redundancy (ensures both html and body have no theme)
  if (document.body) {
    document.body.removeAttribute("data-theme");
  } else {
    // If body not available yet, remove it when DOM is ready
    document.addEventListener("DOMContentLoaded", function() {
      if (document.body) {
        document.body.removeAttribute("data-theme");
      }
    });
  }
})();
</script>

```
