This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 7 years, 8 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to dequeue google fonts
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 7 years, 8 months ago.
Hi there,
I’m a bit of a performance nut, is there a way to dequeue the Lato and Open-Sans (Google fonts) loaded by the plugin.
It seems to be loaded even if I use the theme inherited font. I tried adding this to functions.php, but it didn’t work. Any suggestions?
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'wpdreams-fonts' );
}, 99 );
Thanks!
Hi!
There is no working custom code to handle this, as the action is added via a singleton class which does not exist when the theme is initalized.
You can however bypass it by editing the ajax-search-pro\includes\classes\actions\class-asp-customfonts.php file, by removing/disabling lines 23-24:
$_cf = WD_ASP_Search_Shortcode::getInstance();
$_cf->fonts();
Just remove those lines, or put them into comments.
——–
I’m going to add a filter to the upcoming release, so you won’t have to do this again after update. In the next update just use this code:
add_filter('asp_custom_fonts', 'asp_null_css');
function asp_null_css($css_arr) {
return array();
}
Best,You must be logged in to reply to this topic.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |