Okay
  Public Ticket #3831608
Disable b2bking_fonts_dmsans
Open

Comments

  •  2
    Bob Hufkens started the conversation

    Hi, I can't seem to disable b2bking_fonts_dmsans using any method (wp_enqueue_scripts, wp_footer, wp_head).

    How should it be done?

    Thanks,

    Bob

  •  2
    Bob Hufkens replied

    I also need to disable all Roboto files loaded by the plugin. It's important not to impact my client branding guidelines and just inherit the theme fonts.

  •  2
    Bob Hufkens replied

    I managed to disable dm sans. I'd still like a solution for the Roboto font files though.

    Thanks.

  •  2,330
    WebWizards replied

    Hi there,

    It should be possible to replace B2BKing's fonts with a different font, or to set it to inherit other site fonts.

    To do that, please add this CSS to your site:

    :root {
    		    --b2bking-font-family-a: inherit !important;
    		    --b2bking-font-family-b: inherit !important;
    		    --b2bking-font-family-c: inherit !important;
    }

     

    If the above does not work for you for any reason, I'd suggest to also try adding it as a PHP snippet rather than as CSS directly, e.g.

    add_action('wp_head', function(){
    	?>
    	<style>
    		:root {
    		    --b2bking-font-family-a: "Arial" !important;
    		    --b2bking-font-family-b: "Arial" !important;
    		    --b2bking-font-family-c: "Arial" !important;
    		}
    	</style>
    	<?php
    });

     

    This should replace all plugin fonts, including Roboto.

    Let me know if that can solve it.

     

    Kind regards,

    Stefan

  •  2
    Bob Hufkens replied

    Thanks. Some woff files were still being loaded though because the css vars aren't used consistantly in the css.

    But based on your input I managed to override everything and stop the files from being loaded. I ended up using this:

    [class*="b2bking"], [id*="b2bking"]{font-family: inherit !important;}

    It would be ideal if the fonts could be disabled with a setting.

    Thanks.