Home › Forums › WoodMart support forum › Remove woodmart font
Remove woodmart font
- This topic has 5 replies, 4 voices, and was last updated 5 years, 1 month ago by Eric Watson.
-
AuthorPosts
-
October 5, 2019 at 6:37 pm #148627
Stanley BlackParticipantHello,
How to remove woodmart font(woodmart/fonts/woodmart-font.woff)?
I don’t use your icons and this font just make me problems in gtmetrix and google insights.
Kind regards
October 6, 2019 at 4:39 pm #148724
Elise NoromitMemberHello,
Please find this file:
woodmart/inc/classes/Dynamiccss.php
Next, find this functions:
public function icons_font_css() { $output = ''; $font_display = woodmart_get_opt( 'icons_font_display' ); // Our font. $output .= '@font-face { font-weight: normal; font-style: normal; font-family: "woodmart-font"; src: url("' . WOODMART_THEME_DIR . '/fonts/woodmart-font.eot"); src: url("' . WOODMART_THEME_DIR . '/fonts/woodmart-font.eot?#iefix") format("embedded-opentype"), url("' . WOODMART_THEME_DIR . '/fonts/woodmart-font.woff") format("woff"), url("' . WOODMART_THEME_DIR . '/fonts/woodmart-font.woff2") format("woff2"), url("' . WOODMART_THEME_DIR . '/fonts/woodmart-font.ttf") format("truetype"), url("' . WOODMART_THEME_DIR . '/fonts/woodmart-font.svg#woodmart-font") format("svg");'; if ( 'disable' !== $font_display ) { $output .= 'font-display:' . $font_display . ';'; } $output .= '}'; if ( ! woodmart_get_opt( 'disable_font_awesome_theme_css' ) ) { $prefix = ''; if ( woodmart_get_opt( 'light_font_awesome_version' ) ) { $prefix = '-light'; } // FontAwesome $output .= '@font-face { font-family: "FontAwesome"; src: url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.eot?v=4.7.0"); src: url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.eot?#iefix&v=4.7.0") format("embedded-opentype"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.woff2?v=4.7.0") format("woff2"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.woff?v=4.7.0") format("woff"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.ttf?v=4.7.0") format("truetype"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.svg?v=4.7.0#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal;'; if ( 'disable' !== $font_display ) { $output .= 'font-display:' . $font_display . ';'; } $output .= '}'; } return $output; }
Replace it with this function:
public function icons_font_css() { $output = ''; $font_display = woodmart_get_opt( 'icons_font_display' ); if ( ! woodmart_get_opt( 'disable_font_awesome_theme_css' ) ) { $prefix = ''; if ( woodmart_get_opt( 'light_font_awesome_version' ) ) { $prefix = '-light'; } // FontAwesome $output .= '@font-face { font-family: "FontAwesome"; src: url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.eot?v=4.7.0"); src: url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.eot?#iefix&v=4.7.0") format("embedded-opentype"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.woff2?v=4.7.0") format("woff2"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.woff?v=4.7.0") format("woff"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.ttf?v=4.7.0") format("truetype"), url("' . WOODMART_THEME_DIR . '/fonts/fontawesome-webfont' . $prefix . '.svg?v=4.7.0#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal;'; if ( 'disable' !== $font_display ) { $output .= 'font-display:' . $font_display . ';'; } $output .= '}'; } return $output; }
Best Regards
November 8, 2019 at 11:01 am #155687
JamesParticipantIs this solution still valid?
I can’t find the file
woodmart/inc/classes/Dynamiccss.php
anymore in the directory mentioned.November 8, 2019 at 12:12 pm #155717
Eric WatsonParticipantHello,
Now this code is in the file
woodmart/inc/classes/Themesettingscss.php
functionget_icons_font_css()
Kind Regards
XTemos StudioNovember 13, 2019 at 5:20 pm #156781
JamesParticipantShould I still use the above function you mentioned to replace with?
Asking cause I see the current function is
Themesettingscss.php
has slightly changed,
thanksNovember 14, 2019 at 7:29 am #156858
Eric WatsonParticipantHello,
You can use this function
public function get_icons_font_css() { $output = ''; $url = woodmart_remove_https( WOODMART_THEME_DIR ); $font_display = woodmart_get_opt( 'icons_font_display' ); if ( ! woodmart_get_opt( 'disable_font_awesome_theme_css' ) ) { $prefix = ''; if ( woodmart_get_opt( 'light_font_awesome_version' ) ) { $prefix = '-light'; } // FontAwesome $output .= '@font-face { font-family: "FontAwesome"; src: url("' . $url . '/fonts/fontawesome-webfont' . $prefix . '.eot?v=4.7.0"); src: url("' . $url . '/fonts/fontawesome-webfont' . $prefix . '.eot?#iefix&v=4.7.0") format("embedded-opentype"), url("' . $url . '/fonts/fontawesome-webfont' . $prefix . '.woff2?v=4.7.0") format("woff2"), url("' . $url . '/fonts/fontawesome-webfont' . $prefix . '.woff?v=4.7.0") format("woff"), url("' . $url . '/fonts/fontawesome-webfont' . $prefix . '.ttf?v=4.7.0") format("truetype"), url("' . $url . '/fonts/fontawesome-webfont' . $prefix . '.svg?v=4.7.0#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal;'; if ( 'disable' !== $font_display ) { $output .= 'font-display:' . $font_display . ';'; } $output .= '}'; } return $output; }
Kind Regards
XTemos Studio -
AuthorPosts
- You must be logged in to create new topics. Login / Register