This is an unusual situation where I have a MU installation where one of the network sites is as actually a widget, and therefore the page contains only javascript in a document write statement.

The problem is when you load attempt to use the customizer the javascript on the page is wiping everything else.

I'm wondering:

  • if I can disable live preview completely
  • or if I can make the customizer start on a different, dummy page, instead of the homepage
  • if there's a way to override the visible page in the query parameters
  • if there's some other way to access theme_mod settings via the dashboard (current I'm having to use phpMyAdmin and edit JSON by hand – this is a WPEngine installation…)

home_url() in wp-admin/customize.php seems to be hardcoded, but I may be missing something.

1 Answer 1


Yes, there is a way to disable the Live Preview rendering.

1] Open your theme's functions.php file.

2] Append the following code snippet at the very end of the file:

add_action( 'customize_preview_init', function() {
die("The customizer is disabled. Please save and preview your site on the frontend.");
}, 1);

3] Save your functions.php file.

That's it. I've tested it and it works without issue.

Source: https://snippets.khromov.se/disabled-wordpress-customizer-preview/

  • 2
    Never ever edit WP core files.
    – bravokeyl
    Nov 4, 2016 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.