• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP Bitz

A curated collection of code snippets for WordPress

  • Home
  • About
  • Blog
  • Code Snippets
You are here: Home / WordPress Development Tips / Fix missing Customizer in WordPress 6

Fix missing Customizer in WordPress 6

WordPress Development Tips · October 28, 2022

This post brought to you by RocketGeek, ButlerBlog, and the following:

 

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 );

Filed Under: WordPress Development Tips

Chad Butler

This post brought to you by RocketGeek, ButlerBlog, and the following:

 

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Join for free!

Get free code snippets, WordPress best practices, and practical Content Marketing advice from seasoned WordPress expert Chad Butler (butlerblog):

Recent Posts

  • Bitnami WordPress Autoptimize cannot write to the cache directory
  • Create and delete WordPress sites in XAMPP with a batch file
  • How to fix “Error: MySQL Shutdown Unexpectedly” in XAMPP control panel
  • Fix missing Customizer in WordPress 6
  • Use Proofy.io API to validate WordPress registrations

Copyright © 2023 · Maker Pro on Genesis Framework · WordPress · Log in