- This topic has 1 reply, 2 voices, and was last updated 2 months ago by .
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 › Pro Themes › Travel Eye Pro › Can I stop theme_google_fonts from autoloading?
The site health status of my site identifies a critical issue “Your site has 584 autoloaded options (size: 1 MB) in the options table, which could cause your site to be slow.”
AAA Option Optimizer plugin identifies 7 pages of unused, but autoloaded options, most of them are tiny in size, but theme_google_fonts alone uses 850.69KB.
Can I safely remove the autoload option for theme_google_fonts without damaging the appearance of my site?
FWI I just updated the travel eye pro theme from 2.2 to 2.7
Thanks for any help you can give, I’m pretty clueless about this stuff.
@paul614724, Yes, you can disable autoload option for theme_google_fonts.
Please add this code to your site. You can use code snippet plugin WP Codeto cadd this code
add_action('init', function () {
global $wpdb;
$option_name = 'theme_google_fonts';
// Check if option exists and is set to autoload
$autoload_value = $wpdb->get_var(
$wpdb->prepare(
"SELECT autoload FROM {$wpdb->options} WHERE option_name = %s",
$option_name
)
);
if ($autoload_value === 'yes') {
$wpdb->query(
$wpdb->prepare(
"UPDATE {$wpdb->options} SET autoload = 'no' WHERE option_name = %s",
$option_name
)
);
}
});
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. |