I just recently set up a local WordPress development environment and imported the content from the live site into it using WordPress' built-in export and import functionality.

Unfortunately, this showed up in the header, and is making the local site extremely slow when working offline:

<link rel="stylesheet" id="open-sans-css" href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&amp;subset=latin%2Clatin-ext&amp;ver=3.8.1" type="text/css" media="all">

I'm fairly certain I remember adding this reference to a theme several months ago in its dedicated "Theme Settings" section of the admin interface. Said theme is no longer installed, and I can't even recall its name.

I've gone through and searched all the current theme's files just to make sure that I hadn't added this to the current theme and simply forgotten; and, no, I hadn't.

My question: How can I discover what is adding this reference; and, more importantly, remove it?

  • 1
    Search your entire wp-content folder for a short but identifiable part of the string in case the string is dynamically created. grep is my tool of choice. If you can find it, removing it should be easy enough and if not someone here can tell you how. – s_ha_dum Apr 1 '14 at 20:17
  • The only references that I can find by searching are in WordPress' default themes (twentytwelve, twentythirteen, & twentyfourteen), including this line: // Add Source Sans Pro and Bitter fonts.wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); The current theme is not a child theme. – Nathan Arthur Apr 1 '14 at 20:37

There needs to be a way to turn this off, because this was terribly slow for me too. I did find this plugin will disable it:

Disable Google Fonts

| improve this answer | |

It could be a configuration setting stored outside the files, and in the database instead. Using phpMyAdmin from the control panel of your host, Export the database, then open the SQL file in a text editor and search for the string.


I assume you've already checked the header.php file of the theme?

| improve this answer | |
  • Good suggestion. I'll go try that now. And yes, I have. I've searched all my theme files. – Nathan Arthur Apr 1 '14 at 20:13
  • From the database, in the options table: "WordPress has gotten a facelift. 3.8 brings a fresh new look to the entire admin dashboard. ... The Open Sans typeface provides simple, friendly text that is optimized for both desktop and mobile viewing. It’s even open source, just like WordPress." Does this mean WordPress is doing this by default now? (Note: This was the only instance of sans in the entire database.) – Nathan Arthur Apr 1 '14 at 20:29

Quick steps to identify exactly where it's coming from: 1. comment out wp_head(); in your header.php. If this removes the Google Fonts call then look through your active plugins and the theme (parent and child) functions.php files 2. deactivate plugins one at a time 3. swith to twentyten or similar theme

Depending on which of these steps removes the line of code, you will be able to locate and permanently edit.

My money is on #1 solving it for you. Good luck.

| improve this answer | |
  • Yes, commenting out wp_head does indeed neutralize the stylesheet. However, this isn't a good long-term solution for me as it breaks many plugins. Any idea where to go from there? – Nathan Arthur Apr 1 '14 at 20:42
  • 1
    Sorry I wasn't clear. I meant to comment it out temporarily. – jdm2112 Apr 1 '14 at 20:56
  • Sorry I wasn't clear. I meant to comment it out temporarily for helping to locate it. Your comment on David Hunter's answer above is correct. Open Sans is included with WP3.8 and beyond. If your concern is about the Google Font call being unneccessary, you will likely find that it is only called when displaying the admin bar. In other words, log out (or open in a different browser) and you'll find the Open Sans font is NOT requested – jdm2112 Apr 1 '14 at 21:01
  • 1
    Don't worry about it. Your answer did help me to confirm that it was indeed being generated by wp_head. My concern was only for my own offline development workflow. Having to wait 10 seconds on every page load before WordPress gives up on loading a font is a real bummer. – Nathan Arthur Apr 1 '14 at 21:05

And the answer is found in the file /wp-includes/script-loader.php. Change line 564 from this:

if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {

to this:

if ( 'off' !== _x( 'off', 'Open Sans font: on or off' ) ) {

That's it.

| improve this answer | |
  • Thanks to @s_ha_dum for the idea of just searching through the different WordPress folders. – Nathan Arthur Apr 1 '14 at 21:02
  • 2
    I wouldn't recommend altering core (though it is your local site). There needs to be a way to turn this off, because this was terribly slow for me too. I did find this plugin helps Disable Google Fonts – helgatheviking Apr 1 '14 at 22:14
  • @helgatheviking: That plugin works. Make that an answer and I'll accept it. – Nathan Arthur Apr 9 '14 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.