Okay
  Public Ticket #1077795
Dequeue Open Sans Extended
Closed

Comments

  •  2
    midfieldco started the conversation

    Hey, quick question, can I wp_dequeue_style the Open Sans fallback font for Salient?

    I'd like to set a more sensible default, like Arial? I don't want to load a font from Google Fonts :)

    Thank you in advance.

  •  8,833
    Tahir replied

    Hey Again,

    It is added for Legacy Users so if they update from a really old version of the Theme , there site doesnt break . You can simply comment out the font-face declarations in style.css :

    Bes.t


    ThemeNectar Support Team 

  •  2
    midfieldco replied

    Hello,

    I was wondering if there is a way to simply not load them without tampering with the parent theme. Would like to do this nondestructively.

    In the parent theme functions.php I found this:

    if (!function_exists('remove_wp_open_sans')) :
        function remove_wp_open_sans() {
            wp_deregister_style( 'open-sans' );
            wp_register_style( 'open-sans', false );
        }
        add_action('wp_enqueue_scripts', 'remove_wp_open_sans');

    endif;

    and this:

    ////Default fonts with extended chars
    global $options;
    if(!empty($options['extended-theme-font']) && $options['extended-theme-font'] != '0') {
    wp_enqueue_style( "options_typography_OpenSans_ext", "https://fonts.googleapis.com/css?family=Open+Sans%3A300%2C400%2C600%2C700&subset=latin%2Clatin-ext", false, null, 'all' );

    }

    I am thinking the second snippet is what I want to dequeue. Any way to do this? Thanks!

  •  8,833
    Tahir replied

    Hey Again,

    The code you are referring to is different . I am not aware of removing it at the moment without editing the parent theme . Though have noted to look into this for upcoming Theme Update. 

    Be.st 


    ThemeNectar Support Team 

  •  2
    midfieldco replied

    Thank you, sir. I'll leave it alone for now.

    By the way, congrats on version 8. It's killer!