How to Add Custom Fonts to Your WordPress Site

How to Add Custom Fonts in WordPress?

Do you want to know how to add custom fonts in WordPress? Typography is pivotal in web design, significantly influencing aesthetics and user experience. 

While WordPress offers a selection of default fonts, adding custom fonts can set your website apart. You can ensure that your site’s typography aligns perfectly with your brand ethos, creating a cohesive and engaging visual narrative. 

This comprehensive guide will explore various methods to seamlessly integrate custom fonts into your WordPress site. 

By the end of this guide, you’ll be equipped with the knowledge to enhance your website’s typography. Making it both visually appealing and functionally robust.

Finding Custom Fonts for Your WordPress Site

Selecting the right custom fonts is essential in crafting a unique and engaging WordPress site. The fonts you choose enhance the visual appeal and play a significant role in user experience and brand identity. 

Here’s a guide to help you find and select the perfect custom fonts for your WordPress website:

First, let’s go over some popular font repositories:

  • Google Fonts: Widely used, free resource offering an extensive library of open-source fonts. With over 1,000 font families, it provides various styles suitable for various design needs.
  • Adobe Fonts (formerly Typekit): It offers a vast collection of high-quality fonts, accessible through an Adobe Creative Cloud subscription. This service is ideal for designers seeking unique and premium typefaces to enhance their site’s aesthetics. 
  • FontSquirrel: FontSquirrel is a valuable resource for free, commercially licensed fonts. It curates a selection of high-quality fonts and offers a @font-face generator.
  • Fonts.com: Provides an extensive array of fonts, including both free and premium options. It’s an excellent resource for finding unique typefaces that can set your website apart. 

How to Add Custom Fonts in WordPress?

Now, let’s learn how to add custom fonts in WordPress! One of the easiest methods to add custom fonts in WordPress is using a plugin. Let’s see how!

Method 1: Add Fonts Using Fonts Plugin

As there are thousands of fonts available in Google Fonts, the Fonts Plugin will help you to add any of them to your website. 

Log in to your WordPress admin panel. In the left-hand menu, hover over Plugins and click Add New Plugin. In the search bar, type Fonts Plugin, click the Install Now button, and press the Activate button.

fonts plugin wordpress

Now, in the WordPress dashboard, navigate to Appearance > Customize.

wordpress appreance customizer

Within the Customizer, you will find a section labeled Fonts Plugin. Click on it to access the plugin’s settings.

fonts plugin in dashboard

On the Fonts Plugin section, click on Basic Settings.

basic settings fonts plugin

Now, choose fonts for your site:

  • Base Typography: This setting allows you to select a font for your site’s primary content.
  • Headings Typography: To set a specific font for headings (H1-H6), expand the Headings Typography section.
  • Buttons and Inputs Typography: It helps you change and configure the font for input fields and buttons.

Moreover, for each selected font, you can adjust:

inside basic settings fonts plugin
  • Font Weight & Style: Determine the font’s thickness (e.g., regular, bold) and style (e.g., italic).
  • Font Size: Set the desired size for the text.
  • Line Height: Adjust the spacing between lines to enhance readability.
  • Letter Spacing: Modify the space between individual characters.
customize fonts inside fonts plugin

After configuring your font settings, click the Publish button at the top of the Customizer to apply the changes to your site.

Method 2: Manual Integration Using CSS3 @font-face

Adding custom fonts to your WordPress website can make it look unique and special. This method lets you add any font you like directly to your site. 

Here’s how you can do it:

Step 1: Choose and Download a Font

Look for a font on websites like Google Fonts or FontSquirrel

google fonts

After picking a font, download it to your computer.

download google fonts

Make sure the font files are in web-friendly formats like .woff or .woff2. If the font isn’t in these formats, convert it using the AnyConv.

any conv font converter

Here, upload the ttf fonts and press convert.

any conv convert button

Next, download the converted fonts.

any conv donwload button

Step 2: Upload the Font to Your Website

To access your website’s files, use an FTP client or your hosting provider’s file manager. Here, we will use the File Manager Pro plugin.

wordpress file manager

Browse to the fonts folder in your theme  (usually found in wp-content/themes/your-theme-name(twentytwentythree)/assets/fonts).

fonts folder wordpress theme
wordpress theme folder

Upload the font files you downloaded into the fonts folder you just created.

wordpress upload custom fonts

Step 3: Add the Font to Your Website’s CSS

Find the style.css file in your theme’s folder. You can edit this file using a text editor or through the WordPress dashboard. We will directly edit the .css file.

styles scc file wordpress theme

Use @font-face to Add the Font:

At the top of the style.css file, add the following code:

@font-face {

    font-family: 'YourFontName';

    src: url('fonts/YourFontFile.woff2') format('woff2'),

         url('fonts/YourFontFile.woff') format('woff');

    font-weight: normal;

    font-style: normal;

}
  • Replace ‘YourFontName’ with the name you want to give the font.
  • Replace ‘YourFontFile.woff2’ and ‘YourFontFile.woff’ with the actual names of your font files.
edit styles css file

Now, on new post or page, edit a block in html and insert the custom font as in the image below.

For example, to change paragraph text to your new font, add:

<p style="font-family: 'Roboto', sans-serif; font-weight: 100; font-style: italic;">

    This text is using the Roboto Thin Italic font.

</p>
custom html in post wordpress

You can also create a custom CSS and use it efficiently in the future.

custom css wordpress post

If you’re editing theme files, using a child theme is best. This way, your changes won’t disappear when the theme updates.
Also, adding lots of fonts can slow down your website. It’s a good idea to stick to one or two custom fonts.

Following these steps, you can add custom fonts to your WordPress site using CSS3 @font-face. This will help make your website look the way you want it to.

Method 3: Hiring a Developer to Add Custom Fonts

Hiring a developer is the easiest way to add custom fonts to your WordPress site if you don’t want to deal with plugins or coding. A professional developer will handle everything for you, ensuring the fonts are integrated correctly and don’t slow down your website.

What Will the Developer Do?

  • Find the Right Fonts: The developer will help you choose fonts that match your brand and look great on your site.
  • Upload the Font Files: They will safely upload and store the font files on your website.
  • Add the Fonts to Your Site: The developer will ensure your fonts appear correctly on headings, paragraphs, and other sections.
  • Optimize for Speed: They will ensure the fonts load quickly so your site doesn’t slow down.
  • Make it Work on All Devices: The developer will test the fonts on mobile phones, tablets, and desktops to ensure they look good everywhere.
  • Keep Fonts Safe During Updates: They will use the best practices to ensure your custom fonts don’t disappear when updating your WordPress theme.

Hiring a developer saves time and ensures your fonts are set up professionally so your site looks great and functions smoothly.

Best Practices for Using Custom Fonts

Using custom fonts can make your website look special. Here are some simple tips to use them well:

  • Use Only a Few Fonts: Too many fonts can slow your site. Stick to one or two.
  • Pick Easy-to-Read Fonts: Choose fonts that are clear and simple to read.
  • Have Backup Fonts: Set a default font if your custom font doesn’t load.
  • Use Web-Friendly Formats: Save fonts as .woff2 or .woff for better performance.
  • Load Fonts Early: Make sure fonts load quickly when someone visits your site.
  • Check on Different Devices: Test fonts on phones, tablets, and computers to ensure they look good.
  • Mind the File Size: Smaller font files help your site load faster.
  • Think About Accessibility: Ensure fonts are readable for everyone, including those with visual impairments.
  • Avoid Flashy Fonts for Text: Fancy fonts can be hard to read; use them sparingly.
  • Use Proper Font Weights: Don’t rely on bolding; use the correct font weight for emphasis.
  • Stay Consistent: Use the same fonts throughout your site for a uniform look.

Following these tips will make your website look great and easy for everyone to read.

Conclusion

Adding custom fonts to your WordPress site is a great way to enhance its design and branding. Each method has its benefits, whether you use a plugin, manually integrate fonts with CSS, or hire a developer.

By carefully selecting and implementing custom fonts, you can create a visually appealing, easy-to-read, and brand-consistent website that leaves a lasting impression on your visitors.

Related Tutorial

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.