I have made a site using Word Press Starter with the Custom CSS Add On; however, I cant seem to use a font in it. The FREE theme does not have a way to change it anywhere else which is understood but I was hoping just this code in the CSS file would work. There are no Theme Files accessible.
Additional CSS FILE:
@import url('https://fonts.googleapis.com/css2?family=Limelight&display=swap');
body {
font-family: "Limelight", sans-serif !important;
margin: 0px;
letter-spacing: 0.5px;
background-color: #2b2a27;
}
2
Answers
The problem is that themes often come with their own CSS that overrides the general configuration.
Likely your best bet is to take the nuclear option of
which will overwrite every individual entry of
font-family
withinherit
.It’s not always recommended to use
*
for most things, but your other choice is to:font-family
with either"Limelight", sans-serif !important;
orinherit
,Which can get… messy. Simply adding a wildcard
*{ font-family: !important}
, and adding!important
to yourbody{font-family}
is probably what you want to do.I recommend you open the
functions.php
file in this path:wp-content/themes/your-theme-name
and add the following code:please pay attention this function will add the style as inline CSS in the header of all pages.
In case you do not have direct access to your host, you can edit your functions.php in the following link: