yithemes / yith-proteo

Proteo is a sleek, modern and “Gutenberg-friendly” e-commerce theme. Developed with a beautiful UI and a minimal design, is perfect for each kind of shop. Easy to manage and to customize, Proteo is the best solution if you want a complete e-commerce template and start quickly to sell your products with WooCommerce without a technical knowledge. Use it also for corporate site or a blog: there are no limits about what you can do with a beautiful and usable theme like this!
https://proteo.yithemes.com
GNU General Public License v2.0
32 stars 4 forks source link

Disable Google Font #12

Closed SaeedSoltoon closed 3 years ago

SaeedSoltoon commented 4 years ago

Hi, Great Theme & Thanks for the work. How to disable google font, and add custom font by uploading corresponding font files in child theme? Any help appreciated.

francgrasso commented 3 years ago

Hi there, you can add this function in child theme

/**
 * Disable google font stylesheet
 *
 * @return void
 */
function yith_proteo_customer_remove_google_fonts() {
 wp_dequeue_style( 'yith-proteo-google-font' );
 wp_dequeue_style( 'yith-proteo-custom-google-fonts' );
}
add_action( 'wp_enqueue_scripts', 'yith_proteo_customer_remove_google_fonts', 100 );

This will remove the inclusion of google font stylesheets.

If you want to remove also the custom css added to set the font for each selector involved, you may add this function too:

/**
 * Disable google font custom css
 *
 * @return void
 */
function yith_proteo_massive_google_font_enqueue(){
 return;
}

But please, wait for the coming Proteo version 1.4.2 because we are making this function pluggable. Adding this function in your current version of proteo (1.4.1 and below) will cause a fatal error because of function already declared.

francgrasso commented 3 years ago

Since no news, I'm closing this issue