BuddyBoss Home – Web › Support Forums › Solutions › Social Blogger › Add typekit and stop theme from loading any other fonts
Tagged: google fonts
- This topic has 11 replies, 3 contibutors, and was last updated 8 years, 7 months ago by Alyssa.
Question
February 11, 2016 at 12:21 am #58882@stackstreetnewHello,
Ive integrated Typekit into my theme and I want to remove any loading of other fonts by the theme.
Also, how do I remove the CSS that is generated by that area of the theme settings (looks like its called “dynamic-css” in the html)? In order to override it i included a !important in my new font in custom CSS, but i’d like to get this setup in a cleaner fashion (its currently being injected to the html, see screenshot).
Also no need to load any other fonts that are not used.
Thanks!
Answers
February 12, 2016 at 3:26 am #58993@
AnonymousHi @stackstreetnew,
Theme option css are added as inline css. Adding them as file create issues on some hosting due to permission issues.
Earlier we have used the same approach by adding all css inside option.css but lots of customers have issues with it.Regards
February 12, 2016 at 12:42 pm #59029@stackstreetnewYes I know they are added inline — that was my question. How do I turn off the theme generating these? Also, how do i turn off the theme loading any fonts.
I’m using typekit with all custom styling, and dont need any of the theme generated inline styling from the theme options page OR any fonts.
Thanks!
February 13, 2016 at 12:36 pm #59122@
AnonymousHi @stackstreetnew, These will need to edit core file.
I have suggested to consider custom font type option along with Typekit
Regards
February 16, 2016 at 10:04 pm #59452@stackstreetnewOk it would be awesome to get this done. It makes no sense to load all these different font files.
Even if it was just an action/hook to unregister all of those fonts. Thanks!
February 19, 2016 at 6:45 am #59674@
Anonymoushi @stackstreetnew,
We will push updates in next couple of days and it will have option to remove fonts
RegardsMarch 1, 2016 at 1:19 pm #60962@stackstreetnewWere you able to complete this? Thanks!
March 1, 2016 at 2:27 pm #60968@
AnonymousHi @stackstreetnew
we have added onesocial_font_options hook to filter font family/onesocial/buddyboss-inc/buddyboss-framework/options-init.php line 783
'fields' => apply_filters( 'onesocial_font_options', $font_options )
You can use it to remove those font family which you do not want to add
Regards
Varun DubeyMarch 1, 2016 at 3:56 pm #60971@stackstreetnewi dont want to load any fonts at all.. just my Typekit ones i added myself manually…
March 7, 2016 at 7:05 am #61834@
AnonymousHi @stackstreetnew
You can add following inside child theme functions.phpfunction fonts_fallback( $font_options ) { return; } add_filter( 'onesocial_font_options', 'fonts_fallback');
Regards
Varun DubeyMarch 25, 2016 at 7:46 pm #65365@stackstreetnewI added that and it removed the options from the theme menu, but the theme still calls “<link rel=’stylesheet’ id=’redux-google-fonts-onesocial_options-css’ href=’https://fonts.googleapis.com/css?family=Merriweather%3A900&ver=1458955260′ type=’text/css’ media=’all’ />”
please fix!
April 8, 2016 at 9:20 am #67422@alyssa-buddyboss
AlyssaParticipantHello @stackstreetnew,
I hope you’re doing well. Firstly, I’d like to apologize for the delay in response. Thank you for your patience all this while.
Please put the following lines of code in
functions.php
of your child theme. It will remove google font link added by redux option./** * Remove all google fonts loading by redux */ if ( !function_exists( 'remove_redux_google_font' ) ) { function remove_redux_google_font() { wp_deregister_style('redux-google-fonts-onesocial_options'); wp_dequeue_style('redux-google-fonts-onesocial_options'); } add_action( 'wp_enqueue_scripts', 'remove_redux_google_font', 999 ); }
Let me know if you need more assistance.
Thanks
- The question ‘Add typekit and stop theme from loading any other fonts’ is closed to new replies.