Development,  WordPress

How to get rid of Open Sans and save admin bar?

Well, it isn’t that tricky you may think. You may find a way in the network, it looks like this:

Easy, isn’t it? Well yes, but it has a big disadvantage. It will turn off your admin bar, because dashicons and admin-bar styles depends on open sans style sheet. So, what to do? Fortunately it is very easy – register your own Open Sans handle and… set it to nothing. Do something like this:

And that’s it! It works well. You may stop for a moment and ask yourself – why should I do that? Well, you don’t have to. I use it only if I want to register my own Google Fonts handler (which usually includes Open Sans) and I want to make just one call. As I wrote before, when WordPress 4.6 will be available – it won’t be a problem anymore, because WP4.6 drops Open Sans for native fonts.

Leave a Reply

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