· Design My Website · Code Snippets  · 2 min read

Add a custom font to Salient WordPress theme

Step 1: Download and Install the Custom Fonts Plugin Download the Custom Fonts plugin from this link, and install it on your WordPress site. Step 2: Upload Your Fonts After installing and activating the plugin: Step 3: Add the Custom Fonts to Salient Typography To make your custom fonts appear in Sa

Step 1: Download and Install the Custom Fonts Plugin

Download the Custom Fonts plugin from this link, and install it on your WordPress site.


Step 2: Upload Your Fonts

After installing and activating the plugin:

  1. Go to Custom Fonts settings in your WordPress admin panel.
  2. Upload your font files (e.g., .woff, .woff2, .ttf, etc.).

Step 3: Add the Custom Fonts to Salient Typography

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" );


Explanation of the Code

  • Function Name: salient_redux_custom_fonts() defines a list of custom fonts for the Salient theme.
  • Custom Fonts Array:
    • 'Neo Sans Std Regular' => 'Neo Sans Std Regular': This maps the font name so that it appears in the typography settings dropdown in Salient.
    • Add additional fonts as needed by following the same format.
  • Filter Hook: The redux/salient_redux/field/typography/custom_fonts filter connects the custom fonts with Salient’s typography settings.

Final Steps

  1. Go to Salient Theme Options > Typography.
  2. Your custom fonts (e.g., “Neo Sans Std Regular” and “Neo Sans Std Bold”) should now appear in the typography settings dropdown.
  3. Apply them to the desired elements of your website.

That is an easy way to add a custom font to Salient WordPress theme. For more tips go to our blog.

    Share:
    Back to Blog

    Related Posts

    View All Posts »

    Replace a label on WooCommerce checkout

    The modify_state_county_label function customizes the text displayed on a WooCommerce site, specifically targeting the “State/County” label. Here’s a breakdown of what it does and how it works: Function Explanation Hook: add_filter The add_filter function is used to attach modify_state_county_label

    How much does a website cost in Ireland?

    One of the most common questions we get asked at Design My Website is “how much does a website cost in Ireland?” The honest answer is — it depends. The cost of a website varies depending on the size, complexity and features you need. In this guide we break down exactly what you can expect