Learn in this tutorial how to disable the WordPress font library using code.
WordPress 6.5 introduced quite a few new features, one of the most prominent is the font library.
When you are using a block-based theme (for the moment), this feature allows you to edit, add and manage theme fonts directly from the style editor.
This is a fantastic improvement that opens up many customization options in a very simple way.
So, you may want to disable it on client sites where all the necessary fonts are already configured to prevent them from adding more or removing the existing ones.
Here’s how:
Snippet to disable the WordPress font library user interface
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
It’s as simple as that.
Conclusions
The arrival of the font library makes it possible for any user to manage the fonts of a website. Therefore, if you prefer to avoid possible confusion on client websites, you already know how to disable it.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂