Adding a custom font to BB theme

Hey Ben! These methods will load a web font and allow you to use it with CSS. Unfortunately, there’s no easy way to include custom fonts in the Customizer. It might be possible with some custom code, though. If there’s a filter or action that we could add to make it possible, definitely let us know.

Thanks for the reply Robby. So assuming i’ve followed your first post, i’ve added the function to enqueue the new font, i’ve called the font in my function.php file and i’ve updated my style.css to call the new font. How do i now apply the font to some text on the site? I assume i need to use some CSS selectors in the advanced tab of the text editor, but if so, how do i know what the class and ID are?

Apologies, new to this.

Ben,
Don’t apologize - we’re all here to learn from each other :slight_smile:
It’s worth trying this plugin Use Any Font - I’ve tested it and it seems to work. Also it’s only $10-$20 to get Pro license where you can use unlimited fonts.

No worries at all. You’re correct that you would need to target an element with CSS and set the font that way.

This isn’t the best practice, but you could try something like this:

.bens-class {
  font-family: [your font], sans-serif !important;
}

The important tag will override any other styles. Then, in the page builder, for any module that you want to use the font, you can add the class bens-class in the advanced tab.

And or, the plugin above might be the easiest route. :slight_smile:

Thanks Dennis and Robby, both super helpful responses :slight_smile:

If you’re still looking for a way to inject your custom fonts into the theme customizer, this solution works for me:
https://www.warpconduit.net/2016/02/15/adding-custom-fonts-to-the-beaver-builder-child-theme-customizer/

if anyone is still following this thread, the above solution absolutely works. very quick and easy

Hey Seth,

Thanks for taking the time to let us know! :slight_smile:

Enjoy!

Ben