If you’re using WP 6+ and have a theme that supports Full Site Editing, then you probably noticed that the Customizer is gone. But what if you want to put it back so you can use options that may be added to the Customizer for plugins that support it?
I have seen several options for this that involve either manually going to the Customizer URL or changing themes. But how about just putting it back into the toolbar?
Here’s a quick code snippet to add the Customizer back into your toolbar. Now you’ll have both FSE and the Customizer when needed.
add_action( 'admin_bar_menu', function( $wp_adminbar ) { global $wp; $current_url = home_url( add_query_arg( array(), $wp->request ) ); $wp_adminbar->add_node( array( 'id' => 'customize', 'title' => 'Customize', 'href' => add_query_arg( 'url', $current_url, admin_url( 'customize.php' ) ), ) ); }, 999 );
Leave a Reply