Custom Fonts in WordPress: A Step-by-Step Tutorial

· Ga Satrya · Wordpress
Decoration

Do you want to make your WordPress website more attractive and unique? One of the easiest ways to do that is to use custom fonts. Custom fonts are fonts that are not included in the default WordPress theme or editor. They can help you create a distinctive look and feel for your website, improve readability, and enhance user experience.

In this blog post, we will show you how to upload custom fonts to WordPress using three different methods: using a WordPress plugin, using Adobe Fonts, and using CSS3 @font-face. By the end of this post, you will be able to choose and use any font you want on your WordPress website.

Custom Fonts in WordPress

Custom Fonts in WordPress: A Step-by-Step Tutorial

Method 1: Using a WordPress plugin

One of the simplest and most popular methods to add custom fonts in WordPress is by using a plugin, such as Google Fonts Typography. This plugin allows you to easily access and customize over 1000 fonts from Google Fonts, one of the largest and most widely used font libraries on the web.

To use this method, follow these steps:

  • Install and activate the Google Fonts Typography plugin from your WordPress dashboard. You can find it by going to Plugins > Add New and searching for "Google Fonts Typography".
  • Once the plugin is activated, go to Fonts Plugin > Customize Fonts in the admin sidebar. This will take you to the WordPress theme customizer, where you can see a new section called "Fonts Plugin".
  • In the "Basic Settings" section, you can choose the default fonts for your website. You can select different fonts for headings, body text, buttons, inputs, and navigation. You can also adjust the font size, weight, style, color, and line height.
  • In the "Advanced Settings" section, you can customize fonts for specific elements of your website, such as titles, paragraphs, lists, links, blockquotes, etc. You can also use CSS selectors to target any element you want.
  • When you are happy with your font choices, click on the Publish button at the top to save your changes.

Method 2: Using Adobe Fonts

Another option to add custom fonts in WordPress is by using Adobe Fonts, a service that provides access to thousands of high-quality fonts from Adobe. Adobe Fonts is included with your Creative Cloud subscription or with any Adobe app subscription. You can also sign up for a free account and use over 1000 fonts.

To use this method, follow these steps:

  • Create an account or sign in to Adobe Fonts from your browser. You can find it by going to https://fonts.adobe.com/.
  • Browse or search for fonts that you like. You can filter fonts by classification, properties, languages, tags, etc.
  • When you find a font that you want to use, click on the Activate button next to it. This will add the font to your active fonts list.
  • To use multiple fonts together, you can create a kit. A kit is a collection of fonts that you can embed on your website with one code snippet. To create a kit, click on the Create Web Project button at the top right corner.
  • Give your kit a name and click on Next. Then select the fonts that you want to include in your kit and click on Next again.
  • On the next screen, you will see an embed code that you need to copy and paste into your WordPress website. You can also customize some options such as fallback fonts, font loading behavior, etc.
  • To add the embed code to WordPress, you have two options: using a plugin or doing it manually. If you want to use a plugin, you can install and activate Adobe Fonts (Typekit) from your WordPress dashboard. Then go to Settings > Adobe Fonts and paste your embed code in the Project ID field. If you want to do it manually, you can paste your embed code in the header.php file of your theme or in a custom header plugin.
  • After adding the embed code to WordPress, you can use your custom fonts by applying them in your theme customizer or in your editor. You can also use CSS selectors to target any element you want.

Method 3: Using CSS3 @font-face

If you want more control and flexibility over your custom fonts, you can also use the CSS3 @font-face rule, which allows you to embed any font into your web page. This method requires some technical skills and knowledge of CSS and FTP.

To use this method, follow these steps:

  • Find and download web-friendly fonts from various sources. You can use free font websites such as Font Squirrel, or Google Fonts. You can also use premium font websites such as Envato Elements, MyFonts, or Fontspring.
  • Convert fonts to different formats using a web font generator. Not all browsers support the same font formats, so you need to convert your fonts to make them compatible with different browsers. You can use online tools such as Webfont Generator or Font Squirrel Webfont Generator. You need to upload your fonts and download a zip file that contains the converted fonts and a CSS file.
  • Upload fonts to WordPress using FTP or a file manager plugin. You need to upload your fonts to a folder in your WordPress website, such as wp-content/fonts. You can use an FTP client such as FileZilla or a file manager plugin such as WP File Manager to do this.
  • Declare and use fonts in CSS. You need to add the @font-face rule to your CSS file and specify the font name, source, format, and other properties. You can copy and paste the code from the CSS file that came with your converted fonts or write your own code. Then you can use your custom fonts by applying them in your theme customizer or in your editor. You can also use CSS selectors to target any element you want.

Here's the CSS code will look like:

@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/poppins-v20-latin-regular.woff2') format('woff2');
}

Wrapping Up

As you can see, there are several ways to upload custom fonts to WordPress, each with its own advantages and disadvantages. Using a WordPress plugin is the easiest and most convenient method, but it may limit your font choices and affect your website performance.

Using Adobe Fonts is a great option if you have a Creative Cloud subscription or want to use high-quality fonts from Adobe, but it may require some additional steps and plugins. Using CSS3 @font-face is the most flexible and powerful method, but it may require some technical skills and knowledge of CSS and FTP.

Whichever method you choose, here are some tips and best practices for using custom fonts in WordPress:

  • Limit the number of fonts you use on your website. Too many fonts can make your website look cluttered and confusing. A good rule of thumb is to use no more than two or three fonts per page.
  • Optimize font loading on your website. Fonts can affect your website speed and performance, so you want to make sure they load as fast as possible. You can use plugins such as Autoptimize or WP Rocket to minify and combine your CSS files, defer font loading, preload fonts, etc.
  • Test font compatibility on different browsers and devices. Fonts may look different on different browsers and devices, so you want to make sure they display correctly and consistently. You can use tools such as BrowserStack or CrossBrowserTesting to test your website on various browsers and devices.
  • Choose fonts that match your website style and purpose. Fonts can convey different emotions and messages, so you want to choose fonts that suit your website theme, niche, audience, etc. You can use tools such as Font Pair or Fontjoy to find font combinations that work well together.

We hope this blog post has helped you learn how to upload custom fonts to WordPress. Happy fonting!

PS. If you are curious about how I can help you customize your WordPress website, do not hesitate to reach out!

Website Design Services

Custom website design and development solutions to help your business grow!

Website Package

Website Package

The all-in-one website design services to support your business growth. Includes brand identity, website design & development, and copywriting.

Get The Website Package
Website Design & Dev

Website Design & Dev

Get personalized website design & development that are user-friendly, conversion-focused, and visually appealing.

See Services Pricing
Website Maintenance

Website Maintenance

Keep your website running smoothly with regular updates, bug fixes, security checks, and content management for a hassle-free website.

Get hassle-free website