Most WordPress themes ship with a default font stack — usually a system font like Georgia or a generic sans-serif. It gets the job done, but it rarely reflects the personality of the site. Swapping to a custom font is one of the quickest ways to make a WordPress site look more considered and professional.
The two common approaches are loading fonts from Google Fonts or self-hosting font files on your server. Both work well, but they have different implications for performance and privacy. This guide covers both methods and shows you how to apply your chosen font to headings and body text using CSS.
You do not need a plugin for either approach. A few lines of code in your theme’s functions.php file and a small amount of CSS is all it takes.
Quick Answer
To add a custom font to WordPress, either enqueue a Google Fonts stylesheet via functions.php or upload font files to your server and declare them using @font-face in your stylesheet. Then apply the font using CSS on the body, heading, or element selectors you want to change.
Why Font Choice Affects More Than Appearance
Typography is one of the first things visitors notice about a site, even if they cannot articulate why. A well-chosen font makes content easier to read and reinforces the overall tone of the brand. A poor font choice — or a generic default — can make an otherwise polished site feel unfinished.
Font loading also affects performance. Loading too many font weights or relying on a slow external request can add noticeable page load time. This is why the method you choose matters — not just the font itself.
Method 1: Load a Font from Google Fonts
Google Fonts is the most widely used font service. It hosts hundreds of free fonts and serves them via a fast CDN. The main trade-off is that loading fonts from an external service involves a third-party request, which some privacy regulations and performance audits flag.
If that is not a concern for your site, this is the quickest method to get a custom font working.
Step 1: Choose your font
Go to Google Fonts and find the font you want to use. Select the weights you need — typically Regular (400) and Bold (700) for body text, and possibly a different weight or style for headings. Avoid selecting more weights than you need, as each adds a separate file to load.
Click Get font, then Get embed code. Copy the <link> tag from the embed panel — it will look something like this:
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
Step 2: Enqueue the font in functions.php
Rather than pasting the link tag directly into your theme’s header, enqueue it properly through WordPress. Go to Appearance → Theme File Editor and open functions.php. Add the following, replacing the URL with your own Google Fonts link:
function veravix_enqueue_fonts() {
wp_enqueue_style(
'google-fonts',
'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap',
array(),
null
);
}
add_action( 'wp_enqueue_scripts', 'veravix_enqueue_fonts' );
Use a unique handle — replace google-fonts with something specific to your theme if needed. Setting the version to null prevents WordPress from appending a version query string to the URL, which can interfere with how Google Fonts processes the request.
Step 3: Apply the font via CSS
Once the font is enqueued, apply it in your stylesheet or via Appearance → Customise → Additional CSS. To set it as the default body font:
body {
font-family: 'Inter', sans-serif;
}
To apply a different font to headings only:
h1, h2, h3, h4 {
font-family: 'Playfair Display', serif;
}
If you are using the custom CSS method in WordPress, the Additional CSS panel in the Customiser is the quickest place to add these rules without editing files directly.
Method 2: Self-Host Your Font Files
Self-hosting means uploading the font files directly to your WordPress server rather than loading them from Google or another external source. This removes the third-party request entirely, which improves privacy compliance and can improve performance when configured correctly.
Step 1: Get the font files
Download the font files in WOFF2 format — this is the most efficient web font format and is supported by all modern browsers. WOFF is a useful fallback for older browsers. You can download font files from Google Fonts by clicking the download icon on the font’s page, or from font foundries that distribute free or paid fonts.
Step 2: Upload the font files
Upload your font files to your server via FTP or your hosting file manager. A sensible location is inside your theme folder: wp-content/themes/your-theme/fonts/. Create the fonts folder if it does not exist.
Step 3: Declare the font with @font-face
Add an @font-face declaration to your stylesheet. The path needs to point to where you uploaded the files:
@font-face {
font-family: 'Inter';
src: url('/wp-content/themes/your-theme/fonts/inter-regular.woff2') format('woff2'),
url('/wp-content/themes/your-theme/fonts/inter-regular.woff') format('woff');
font-weight: 400;
font-style: normal;
font-display: swap;
}
Add a separate @font-face block for each weight you are using. The font-display: swap property tells the browser to show fallback text immediately while the font loads, rather than hiding text until the font file arrives — this matters for both user experience and performance scores.
Step 4: Apply the font via CSS
Apply the font using the same CSS selectors as in Method 1:
body {
font-family: 'Inter', sans-serif;
}
Practical Tips
- Limit font weights. Each weight is a separate file. In most sites I build, two weights per font family (regular and bold) are enough. Loading four or five weights adds unnecessary overhead.
- Use font-display: swap. Without this, some browsers hide text until the font loads. Always include it in your
@font-facedeclarations. Google Fonts adds it automatically when you use thedisplay=swapparameter in the URL. - Stick to one or two typefaces. A body font and a heading font is a common and effective pairing. Beyond two families, things start to look inconsistent and load times increase.
- Test at smaller sizes. Fonts that look great at 24px in the editor can become difficult to read at 14–16px in the body. Always check how the font renders at paragraph size before committing to it.
Common Mistakes
- Pasting the link tag directly into header.php. This works but bypasses WordPress’s asset management system. Changes can be overwritten by theme updates, and there is no dependency handling. Always use
wp_enqueue_style(). - Using the wrong font-family name in CSS. The name in your CSS selector must match the name declared in
@font-faceor the name Google Fonts uses exactly. A mismatch silently falls back to the default font with no error. - Forgetting to clear cache. If you are using a caching plugin and the font change does not appear, purge the cache. LiteSpeed Cache, for example, caches CSS — the updated rules will not be visible until the cache is cleared.
- Loading fonts without HTTPS. If your site runs on HTTPS and the font URL uses HTTP, the browser will block the request as mixed content. Always make sure the font URL uses HTTPS.
Google Fonts vs Self-Hosting: Which to Use
Google Fonts is faster to set up and gives access to a large library without managing files. Self-hosting gives you more control, removes the third-party dependency, and is a better choice if you are operating under GDPR and want to avoid sending visitor IP addresses to Google’s servers.
For most sites, Google Fonts with display=swap in the URL performs well and is straightforward to maintain. For sites with stricter privacy requirements or a need to minimise external requests, self-hosting is the cleaner option. I usually go with Google Fonts for smaller projects and self-hosting for anything where performance tuning or GDPR compliance is a priority.
Conclusion
Adding a custom font to WordPress takes less than ten minutes once you know where the code goes. Pick your font, keep the weights to a minimum, and apply it with a clean CSS selector on body and your heading tags. The difference in how a site looks and feels is worth the small effort.

Etienne Basson works with website systems, SEO-driven site architecture, and technical implementation. He writes practical guides on building, structuring, and optimizing websites for long-term growth.