WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Someone knows if is there a way to customize the redirection after a user click "close" in the Wordpress Customizer" live editor?

It would be very useful. Thank you very much.

share|improve this question
up vote 2 down vote accepted

You might try to use jQuery to change the url behind the Close link.

Another idea would be to use wp_get_referer() to intercept the page loading when you go from customize.php to themes.php by hooking into the load-themes.php action:

add_action( 'load-themes.php', 'my_customize_redirect' );
function my_customize_redirect() {

    if ( strstr( wp_get_referer(), '/wp-admin/customize.php' ) )
            $url = get_admin_url(); // EDIT this to your needs
            wp_safe_redirect( $url );

share|improve this answer
Works like a charm. Thank you very much birgire. – Virgo Sep 26 '13 at 13:50
you're welcome, great to hear it worked for you - cheers – birgire Sep 26 '13 at 15:55
Here is a jQuery solution. – birgire Sep 30 '13 at 21:24
I filed a Core track ticket #25457 here. My user-experience is that the Theme Customizer feels like a fullscreen popup with a close button. When I close it, I expect to go back to the previous page. – birgire Dec 30 '13 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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