Download the Custom Fonts plugin from this link, and install it on your WordPress site.
After installing and activating the plugin:
.woff
, .woff2
, .ttf
, etc.).To make your custom fonts appear in Salient’s typography settings, add the following code snippet to your theme’s functions.php
file:
phpCopy codefunction salient_redux_custom_fonts() {
return array(
'Custom Fonts' => array(
'Neo Sans Std Regular' => 'Neo Sans Std Regular',
'Neo Sans Std Bold' => 'Neo Sans Std Bold'
)
);
}
add_filter( "redux/salient_redux/field/typography/custom_fonts", "salient_redux_custom_fonts" );
salient_redux_custom_fonts()
defines a list of custom fonts for the Salient theme.'Neo Sans Std Regular' => 'Neo Sans Std Regular'
: This maps the font name so that it appears in the typography settings dropdown in Salient.redux/salient_redux/field/typography/custom_fonts
filter connects the custom fonts with Salient’s typography settings.That is an easy way to add a custom font to Salient WordPress theme. For more tips go to our blog.
Schedule a free consultation today.
Design My Website are a web design company based in Kerry. The majority of our meetings are done via video call but we can travel within Munster.