Image Showing How To Add Custom Fonts In Wordpress

Due to overwhelming popular demand, some themes now include hundreds of typefaces as part of the theme itself. However, you should be aware that utilizing numerous typefaces on a single page might cause the site to load slowly.

With the advancement of plugins and themes, the possibilities are endless.

We’ll go through how to add custom fonts in WordPress in this article. We’ll also go through how to make the most of your website. As a result, it does not slow down while using custom fonts. So let’s start with the fundamentals and learn how to discover custom fonts for your WordPress site.

Understand what custom fonts are (and why you would want to use them)

The term “custom typefaces” includes a wide range of chances. However, because we’re articulate about WordPress, we’ll apply it to any typeface. The content management system (CMS) does not come with it out of the box. There are dozens of custom font possibilities available online. In general, nothing prevents you from employing any of them.

However, keep in mind that the typefaces you select should be more than just visually attractive. They must additionally fulfill the following extra requirements:

  1. Each typeface you use should be simple to read.
  2. It must flow well with the rest of your website’s dandell as the other fonts you use.
  3. Because of the mobile responsiveness initiator, letters should be friendly and excellent at both large and small sizes.

Fonts provide you with another option to communicate the design of your website. They can become associated with your brand. Over time, users may begin to associate them with your website and company. As a consequence, you should consider all of your alternatives carefully.

How to Locate and add Custom Fonts in WordPress

Fonts used to be costly, but not any longer. There are several websites where you may get fantastic free online fonts, like Google Fonts, Typekit, FontSquirrel, and

Suppose you’re not sure how to mix fonts. Then you may try Font Pair. It assists designers in combining attractive Google fonts.

While you’re choosing your typefaces, keep in mind that employing too many unique fonts can cause your website to load slowly. As a consequence, you should select two fonts and utilize them consistently throughout your project. It will also help your design to be more consistent.

Font Conversion to a Web-Friendly Format

It is important to note that not all web browsers support all custom fonts. Nonetheless, even if the font you’ve selected isn’t supported. It is still feasible to convert it to an appropriate format.

Before you start converting fonts from one format to another, be sure you know what you’re doing. First, let’s take a brief look at some font formats:

  • Open Type Fonts (OTF) are the most widely used online fonts and a registered trademark of Microsoft. This format is compatible with nearly all major browsers.
  • True Type Fonts (TTF) were created in 1980 by Microsoft and Apple. Both Windows and macOS are widely used.
  • Web Open Font Format (WOFF) — a popular web page format suggested by the World Wide Web Consortium (W3C).
  • WOFF 2.0 is thought to be a superior alternative to WOFF 1.0 owing to improved compression capabilities. This format is not supported by Safari or Internet Explorer; however, it is compatible with Google Chrome, Firefox, and Opera.
  • Embedded OpenType Fonts (EOF) are smaller OTF fonts used as embedded fonts on websites. All major browsers support EOF.

Use the Web Font Generator if you are unsure whether your font is compatible with your default browser. This application makes it simple to convert nearly any typeface to a web-friendly format:

1. Navigate to Webfont Generator.

2. Select a typeface to convert by clicking the Upload Fonts option.

3. In the Agreement section, check the box to indicate that your typefaces are legally permissible for web embedding.

4. Click on the Download Your Kit button and save package to your PC.

Image Showing How To Add Custom Fonts In Wordpress

5. The package includes fonts in WOFF and WOFF 2.0 formats and CSS files, and an example HTML page.

How to Setup Custom Fonts in WordPress

We’ll teach you how to add custom fonts in WordPress using Google Fonts and manually.

Method 1: Using the Easy Google Fonts Plugin to Add Custom Fonts

If you wish to add and use Google Fonts on your website, follow these steps. Then this is by far the most straightforward and most recommended approach for novices.

The first step is to install and activate the Easy Google Fonts plugin.

After activation, navigate to the Appearance> Customizer page. It will launch the live theme customizer. In addition, it’s where you’ll find the new Typography section. Image Showing How To Add Custom Fonts Using Easy Google Fonts Plugin

By selecting Typography, you may view different areas of your website. For example, you can use Google Fonts, click on the ‘Edit Font’ button to the right of the section you wish to change the font for.

Image Showing How To Add Custom Fonts From Appearance In Wordpress

You may select any Google Font from the font family area. Then, you’d like to utilize it on your website. You may also change the font style, font size, padding, margin, and other options.

It may limit the number of parts here, depending on your theme. Many various aspects of your website may not allow you to alter the font directly.

The plugin allows you to design your controls. You may also use them to alter the fonts on your website.

First, go to the Settings > Google Fonts page and give your font control a name. Then, use anything that will assist you to comprehend fast, where you will use This font control.

Image Showing How To Add Custom Fonts In Wordpress

Then, select the ‘Create font control’ option. After that, you will promote to add CSS selectors. You can specify the HTML components you want to target (h1, h2, p, blockquote). Alternatively, it can use CSS classes.

You may use your browser’s Inspect feature to determine which specific region utilizes CSS classes. However, you wish to alter your situation.

Now, press the ‘Save font control’ button. Also, save your preferences. Then, you may construct as many font controllers as you need for different areas of your website.

To take advantage of these font controllers. First, it would be best if you navigated to appearance » Customizer. Then choose the Typography tab.

There is now a ‘Theme Typography‘ option under Typography. When you click on it, it will display your previously generated custom font settings. You may now click the edit button. And then customize the fonts and look at this control.

Image Showing How To Add Custom Font Using Theme Typography

Don’t forget to protect or circulate your changes by clicking the save or publish button.

Method 2: Using Google Fonts Manually in WordPress

This approach necessitates the addition of code to your WordPress theme files.

To begin, go to the Google Fonts collection. And then choose a typeface to use. Then, beneath the font, click the fast usage icon.

Image Showing How To Manually Add Custom Fonts In Wordpress

The styles are available for the typeface lists on the front page. First, choose the classes you wish to utilize in your project. Then, at the top, click the sidebar button.

Image Showing How To Manually Add Custom Fonts In Wordpress

Then, on the sidebar, navigate to the ‘Embed’ tab. You may get the embed code by copying it. You may add this code to your WordPress site in two ways.

To begin, change the header.php file in your theme. And then add the code before the tag. However, if you are new to WordPress code editing, you may add this code using a plugin.

Download and install the Insert Headers and Footers plugin. After activation, navigate to the Settings » Insert Headers and Footers page. And then copy and paste the embed code into the ‘Scripts in header’ box.

Image Showing How To Add Code In Headers And Footer In Wordpress

Don’t forget to save your changes by clicking the Save button. The Google Font embed code will now be loaded on all pages of your website by the plugin.

This font may be used in your theme’s CSS as follows:

1. h1 site-title {
2. font-family: 'Open Sans', Arial, sans-serif;
3. }

Calling Custom Fonts in a Style Sheet

Now that the typefaces have been added to your website. They are now officially available for usage. To do so, add a declaration for the new font to your style sheet. For instance, you might alter the font of your heading tags. You’d say something like this:

1. h1,

2. h2,

3. h3,

4. h4,

5. h5,

6. h6 {

7. font-family: 'Roboto';

8. }

How to Use Custom Fonts in Gutenberg

Using the code provided above. You may change the Appearance of your typography on the front end of your website. However, it will not affect the Appearance of your material when you’re editing it in the WordPress editor.

Because one of the primary goals of the WordPress Gutenberg editor is to make the transition between the editing process and the final product more smooth, this is a definite no-no. As a result, it is critical to discuss how to cope with this.

We’ve already completed the first step by hooking the enqueued fonts into en queue_ block _assets rather than wp _ en queue _scripts, as was previously the case.

It makes the font available on the front end of your website and within the Gutenberg editor. So you already know how to change the typeface on your website’s first page. Making identical modifications inside the editor, on the other hand, necessitates an extra step.

Include @font-face in your CSS.

Navigate to Appearance> Custom CSS on your WordPress site.

Replace /your-theme/ with the folder of your theme when adding the code below:

@font-face {

font-family: 'font name';

src: url('wp-content/themes/your-theme/fonts/font-file.eot');

src: url('wp-content/themes/your-theme/fonts/font-file.eot?#iefix') format('embedded-opentype'),

url('wp-content/themes/your-theme/fonts/font-file.woff') format('woff'),

url('wp-content/themes/your-theme/fonts/font-file.ttf') format('truetype'),

url('wp-content/themes/your-theme/fonts/font-file.svg#font-name’) format('svg');

font-weight: normal;

font-style: normal; }

Add the path to each font file available inside the url() data type. If you don’t have a format, such as .svg, simply skip that line.


substitute your name for font-family:

font-family: 'font name';

If you intend to create font variations, define the weight and style. Set the setting for both to normal by default:

font-weight: normal;
font-style: normal;


If you look at the typefaces that websites employ, you’ll find that many utilize the same few tried-and-true options. As a result, some typefaces are relatively safe bets when it comes to readability and user accessibility. However, with thousands of free and paid alternatives to pick from, it’s worth looking for one that also precisely suits your website’s design and audience.

In terms of how to add custom fonts in WordPress. You may go about it in three distinct ways:

  • First, edit the theme’s file.
  • Place the font file in the theme’s folder.
  • Third, use a custom fonts plugin for WordPress.


Load More Related Articles
Load More By Susana Taylor
Load More In Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *