Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there any way to remove the function call to the googlefontapi font in the parent header.php file besides copying the parent header.php file to the child theme and then overriding it and delete the line of codes?

I was searching for a way to dequeue the call but it doesn't have a handle and it's an inline script in the parent theme header.php file.

(function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
})();

Thanks in advance.

share|improve this question
2  
There are not really any good solutions to do this, and none that WP can provide. –  Wyck Jan 31 at 0:17
    
Time to look for a quality coded theme which enables full customization. That's not the best way to load Google fonts. –  Brad Dalton Jan 31 at 13:06
    
You are definitely correct but unfortunately I'm stuck with the theme and I'm limited to customization in my current situation. I appreciate all your comments. –  rolu Jan 31 at 14:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.