Custom Font in Child Theme
-
Hello,
I’m trying to add a custom font family using a child theme but I can’t get it to work. The font files have been uploaded to the cPanel File Manager and I’ve successfully created and activated the child theme. So far, I have the following code in the stylesheet:
@font-face { font-family: GothamNarrow; src: url(public_html/myusername/wp-content/themes/primer-child/fonts/GothamNarrow-Medium.otf); font-weight: normal; } @font-face { font-family: GothamNarrowBold; src: url(public_html/myusername/wp-content/themes/primer-child/fonts/GothamNarrow-Bold.otf); font-weight: bold; } h1, .page-title { font-family: GothamNarrowBold; font-size: 2.5em; } h2 { font-family: GothamNarrowBold; font-size: 2em; } h3 { font-family: GothamNarrowBold; font-size: 1.5em; } h4 { font-family: GothamNarrowBold; font-size: 1.25em; } h5 { font-family: GothamNarrowBold; font-size: 1.125em; } h6 { font-family: GothamNarrowBold; font-size: 1em; } p { font-family: GothamNarrow; }
Am I missing something?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Font in Child Theme’ is closed to new replies.