UltimateFonts can be a useful additional feature for your theme as all WordPress themes need the customization, especially for fonts. Using UltimateFonts, you don’t need to spend a lot of time on working with the Customizer and typography options as the plugin cares everything for you.

To integrate UltimateFonts into your WordPress theme, follow these steps:

  1. Put the plugin zip file ultimatefonts.zip into your theme folder.
  2. Download the TGM Plugin Activation class and put it into your theme folder.
  3. Follow the instruction of the TGM Plugin Activation class to tell users to install the UltimateFonts plugin

Further, the UltimateFonts plugin allows you to adjust its settings with 2 options:

To do that, simply add the theme support for UltimateFonts, like this:

add_action( 'after_setup_theme', 'theme_prefix_ultimatefonts_setup' );
function theme_prefix_ultimatefonts_setup() {
    add_theme_support( 'ultimate-fonts', array(
        'no_settings'      => true, // Disable the plugin settings page
        'default_elements' => array(
                'label'    => esc_html__( 'Post title', 'theme-textdomain' ),
                'selector' => '.entry-title, .post-title',
            // Add more elements if you want
    ) );

If you can see default_elements are an array of the elements that your theme offers to users to change fonts for. Each element is an array of label and CSS selector.

We hope you enjoy the plugin and happy theming!