How do I go about removing the open sans font link from WordPress’s header without using a plugin?
I’m currently using twentyfifteen theme and I was using Disable Google Fonts plugin but I’m trying to cut down on plugins.
How do I go about removing the open sans font link from WordPress’s header without using a plugin?
I’m currently using twentyfifteen theme and I was using Disable Google Fonts plugin but I’m trying to cut down on plugins.
Comments are closed.
You need to
dequeue_style
with an additional priority call:See https://codex.wordpress.org/Function_Reference/wp_dequeue_style
Use this function in a child theme, because if you edit the original twentyfifteen theme, your changes will get overwritten with one of WP’s peridodic theme updates. See Child Themes « WordPress Codex
And then remove any calls for Open Sans from
font-family:
rule in the stylesheet.Add this to your functions.php file of your child theme.
The Google fonts are being added like this:
So you need to dequeue the styles like they are added.