Hi,
Thank you for trying the theme and I am glad you like it.
That is a good point you have. For now, you can simply dequeue the script with a function.
function swp_dequeue_webfont() {
wp_dequeue_script( 'webfont-loader', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array(), KIRKI_VERSION );
}
add_action( 'wp_footer', 'swp_dequeue_webfont', 11 );
However, I have noted this as a feature request too. In a future release, I will add an option to disable Google Fonts completely.
Hope this helps. Let me know please how it goes.
Cheers,
Munir
Thread Starter
Tom
(@shimsa)
Hi,
Okay, I’ll wait for the theme to be updated.
But please leave the option to set the required Google fonts. In CSS, it will be noted which font is used for which theme area. However, the Google fonts would actually be dropped (a checkmark in the template settings) and local fonts would be used for rendering. Is this realistic?
Sorry for my English.
Thank you.
Tom
Hi,
Your actual request to disable webfont.js can be achieved right away with the function I provided.
Related to better font management, that is something I plan for a future release, but not in the immediate next update to be clear. Let me think of a better solution I can put in place which makes font management super simple and also doesn’t add any bloat.
Hope this clarifies it. If you are able to disable the webfont.js library, could you please mark this post as resolved?
Also, if you got more ideas/suggestions, please do pass my way.
Regards,
Munir
Thread Starter
Tom
(@shimsa)
Hi,
I have really solved it simply by using the “Code Snippets” plug-in. It works beautifully. That’s what I needed. Now I’m happy 🙂
In the future, if this could be possible without the “Code Snippets” plug-in, it would be even better.
However, I highly praise the support of webfont.js, it is definitely useful, and although I am using local fonts now, I am very glad to have this option.
Thank you very much.
Tom
Hi @shimsa,
Glad the issue has been resolved for you. And surely it on my roadmap to integrate better font management options as I mentioned. If you got any further feedback/feature requests, please do pass my way.
And if you are happy, I will really appreciate getting a review on this new theme. 🙂
https://ww.wp.xz.cn/support/theme/start/reviews/#new-post
Cheers,
Munir