How to enable customizer in a Block Theme
Do you want to enable customizer in a block theme in WordPress?
If yes then in this tutorial we have discussed the step by step process on how can you do this easily.
In WordPress 5.9, full site editing was introduced which marked the release of block themes and new site editor.
This new site editor, replaced the customizer in block themes and using it users can customize / personalize their sites.
It is important to know that when you activate a block theme, the change is quite visible as you will notice quite a few options under the Appearance menu have either been moved to tools.
Or have been replaced by the new site editor.
As you can see this is a major change and that is why it will take a bit of time to get used to if you are looking to use a block theme in the future.
Keeping this in mind, if you are looking for a smooth transition from classic to block themes then you can activate Customizer by adding a code snippet.
And in this tutorial we have discussed how can you enable customizer in a block theme easily. Below are all the topics covered
Things to know before enabling Customizer in a block theme
Before we dive into this tutorial, it is important to know that if you are using Yoast or Woocommerce then you will not have to add this code snippet as the customizer get enabled on using these plugins.
Yoast SEO users will find an additional Yoast SEO Breadcrumbs option in customizer.
And Woocommerce users will find
- Store Notice
- Store Catalog
- Product Images
- Checkout
Under the Woocommerce option in Customizer.
Also, the options to customize a WordPress theme such as Colors, Widgets, Menus and more will not be available.
And this means you will have to use the new site editor to make any design related changes or create menus.
In case you are wondering which options will be available then let me tell you
- You will get access to Site Identity where you will be able to add or change Site Title, Tagline and Site icon (Favicon)
- The next option you will get is Homepage Settings and using it you will be able to select which page you want to display as homepage and posts page.
- The last option you will get is Additional CSS and here you will be able to add your own CSS code to customize the appearance of your site.
Keeping this in mind, lets dive into the tutorial
How to enable Customizer in a WordPress block theme
While doing research for this tutorial, I did try to find plugins that can help you do this.
However, I was unable to find anything. In case you come across a plugin that activates Customizer in block themes then feel free to let me know.
And I will add it here.
Having said that,
Lets activate customizer in Block themes
Login to WordPress dashboard (optional)
To enable customizer in a block theme, the first step is to login to your WordPress admin and for this you need to visit https://example.com/wp-admin
And it will take you to the login page of your site where you will have to enter your credentials.
Find functions.php file
Once you are inside your WordPress dashboard, the next step is to navigate to Tools and click Theme File Editor option.
Doing this will show you all the theme related files and here you will have to search for functions.php in the list.
Add code snippet to enable customizer in block theme
On successfully locating the functions.php file, the next step is to open it and scroll down to the very end.
Once you are at the bottom, the next step is to add the code snippet shared below and click Update File to save the changes.
add_action( 'customize_register', '__return_true' );
Check if Customizer in active in block theme
After you have saved the changes, the next step is to head over to Appearance menu and see if the Customize option is not active.
For this you need to either click Appearance or hover your cursor over it and it will show you the Customize option.
Clicking Customize will take you to the Theme Customizer where you will see Site Identity, Homepage Settings and Additional CSS options.
And that’s it you have successfully enabled Customizer in block themes in WordPress.
Having said that,
I hope you will find this tutorial helpful and are able to easily enable Customizer in a block theme in WordPress.
In case you have any queries regarding this then feel free to get in touch.
To stay up to date with our content we recommend subscribing to our YouTube channel and email list.
Also, don’t forget to join our Facebook group.