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') +
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);

Thanks in advance.

  • 2
    There are not really any good solutions to do this, and none that WP can provide. – Wyck Jan 31 '14 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 '14 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 '14 at 14:03

Your Answer

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

Browse other questions tagged or ask your own question.