How to change font in WordPress using CSS?

Table of Contents

Alright, this is the no-nonsense way. CSS. No plugins. No guessing where the theme hid the font option this time. You tell the site exactly what to do, and it listens. Mostly.

First thing. You need a font. Let’s say you’re using a Google Font because that’s what most people do. Free, decent, no hassle.

Now the steps. Slow and steady.

  1. Log into WordPress

  2. Go to Appearance → Customise

  3. Scroll down and click Additional CSS

This is where you’re allowed to boss the site around.

If you’re using a Google Font, you first need to load it. Paste this at the top. Replace the font name with whatever you’re using.

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

Now tell WordPress where to use it.

For normal text across the site:

body {
font-family: 'Roboto', sans-serif;
}

For headings only:

h1, h2, h3, h4, h5, h6 {
font-family: 'Roboto', sans-serif;
}

That’s the basic setup. Click Publish. Refresh your site. If the font changes, you’re laughing.

If nothing changes, don’t get annoyed yet. Some themes are stubborn and override the body tag. Very common.

In that case, you need to be more specific. Try this:

body, p, li, a {
font-family: 'Roboto', sans-serif;
}

Still nothing? Then your theme is probably using its own wrapper class. At that point, right-click on text on your site, click Inspect, and look for the main content class. You’ll see something like .site-content or .entry-content. Then do this:

.entry-content {
font-family: 'Roboto', sans-serif;
}

Now, about cost. Google Fonts are free. Zero euro. If you’re using a paid custom font, you’ve probably already paid between €20 and €50 for the licence. Fair enough. Just upload it properly and reference it in CSS. If you’re paying someone to do this for you, expect €50–€100 for a clean job. More if the site is a mess.

One honest bit of advice. Don’t change fonts every week. Pick one that’s easy to read and leave it alone. Most people visiting your site in Ireland aren’t admiring typography. They’re skimming on a phone while the kettle’s on.

CSS looks scary until you use it once. After that, it feels oddly satisfying. Like finally fixing that door that’s been sticking for months.

Facebook
Twitter
LinkedIn
Pinterest

Interested in website maintenance for your company.?We can help. 

RECENT FAQs