How to elimnate the Inter font on my site?

This topic has 8 replies, 4 voices, and was last updated 4 months, 2 weeks ago ago by Andrew Mitchell

  • Avatar: stemalo
    stemalo
    Participant
    January 12, 2025 at 16:50

    I don’t like to use Inter font. I saw it needs still a lot of resources during web site is called. How can i eliminate this font completely?

    7 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 13, 2025 at 08:20

    Hello, Stemalo,

    Thank you for reaching out to us.

    Could you please provide temporary wp-admin and FTP access? We will check what can be done to help you.
    To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.

    For FTP access, we require the following details: FTP host, FTP username, FTP password, FTP port, and FTP encryption type. If you need assistance in creating these credentials, please reach out to your hosting provider who will guide you through the process.

    Best Regards,
    8Theme’s Team

    Avatar: stemalo
    stemalo
    Participant
    January 13, 2025 at 10:01

    See private content.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 13, 2025 at 10:34

    Hello, Stemalo,

    Thank you for providing the FTP access details. However, we currently do not have working WP-Admin access. The credentials you previously shared are no longer functional.

    Could you kindly verify the WP-Admin access details and provide updated credentials, ensuring they are working?

    We appreciate your assistance.

    Best regards,
    8Theme Team

    Avatar: stemalo
    stemalo
    Participant
    January 13, 2025 at 10:43

    The attached credentials are working fine.

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    January 13, 2025 at 14:18

    Hi @stemalo,

    We’ve removed the Inter from which is loading from WooCommerce plugin for you by adding this custom code under functions.php file of child theme:

    
    add_filter( 'wp_theme_json_data_theme', 'disable_inter_font', 100 );
    function disable_inter_font( $theme_json ) {
        $theme_data = $theme_json->get_data();
        $font_data  = $theme_data['settings']['typography']['fontFamilies']['theme'] ?? array();
    
        // The font name to be removed
        $font_name = 'Inter';
    
        // Check if 'Inter' font exists
        foreach ( $font_data as $font_key => $font ) {
            if ( isset( $font['name'] ) && $font['name'] === $font_name ) {
                // Remove the font
                unset($font_data[$font_key]); 
                
                // Update font data
                $theme_json->update_with( array(
                    'version'  => 1,
                    'settings' => array(
                        'typography' => array(
                            'fontFamilies' => array(
                                'theme' => $font_data,
                            ),
                        ),
                    ),
                ) );
                break;
            }
        }
        return $theme_json;
    }
    

    For more information, please take a look at this article: https://stackoverflow.com/questions/79110651/how-to-remove-very-heavy-inter-font-from-woocommerce.

    Hope it helps!

    Avatar: stemalo
    stemalo
    Participant
    January 13, 2025 at 15:42

    Sorry. Didn’t know that this is related to WooCommerce itself. Thank you very much for doing this for me. There are still fragments loading, but the major part is gone away I think. These have been over 230 KB.

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    January 13, 2025 at 15:43

    Dear stemalo,

    In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?

    Click here to share your thoughts: https://themeforest.net/downloads

    Being part of our community means a lot, and your feedback contributes immensely.

    Best Regards,
    The 8Theme Team

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘How to elimnate the Inter font on my site?’' has been successfully resolved, and the topic is now closed for further responses

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.