PLEASE POST YOUR REQUEST IN THE APPROPRIATE THEME CATEGORY. TICKETS POSTED IN OTHER "NON-THEME" CATEGORIES WILL NOT BE PROCESSED AND WILL BE REMOVED.

Before posting, be sure that your WP intallation, the theme and all plugins are up-to-date. Also, be sure that the Wolf WPBakery Page Builder plugin is activated with your theme purchase code in the "Apprearence" > "About the theme" panel > "Licence" tab.

PHP -> 7.4+
WP -> 5.8+

Your Theme -> Latest version
WPBakery Page Builder -> 6.6+
Wolf WPBakery Page Builder Extension -> 3.2+ & Activation with theme purchase code

Thank you!

Okay
  Print

Add Custom Fonts to Your Theme

  • To import custom fonts to your theme, use the child theme included in your theme package.
  • Your fonts must be in web format, meaning you must have one or several font files for each font (ttf, wotf format, etc.) and a CSS snippet to include.
  • To be able to use your new font in the customizer and page builder element settings, you need to add a custom function in your child theme functions.php


Here is an example with the Roboto font. We will use the Font Squirrel web generator tool to generate a font package.

1. Import the font files in your child theme. We recommend copying the files into a assets/fonts folder of your theme.


2. Paste the CSS import snippet into your child theme style.css file

Make sure the path to your font files is correct.

@font-face {
    font-family: 'Roboto Regular';
    src: url('assets/fonts/Roboto/roboto-regular-webfont.woff2') format('woff2'),
         url('assets/fonts/Roboto/roboto-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


3. Finally, add this PHP filter function to display the fonts in the theme and page builder options.


/**
 * Add custom font to the theme
 */
function add_custom_fonts( $fonts ) {
    $fonts[] = 'Roboto Regular';
    /* Add more fonts below */
    // $fonts[] = 'Roboto Italic';
    return $fonts;
}
add_filter( 'herion_custom_fonts', 'add_custom_fonts' ); // replace the "loud" prefix with your theme prefix

You can download this child theme example HERE.