Site logo

Archived topic

Using multiple fonts for content

1 reply · Started by Johnny on January 4, 2019

Viewing posts 1–2 of 2

Hi there,

you can install fonts locally, this document shows you how:

https://docs.generatepress.com/article/adding-local-fonts/

Or you can copy the standard embed code google provides eg.

<link href="https://fonts.googleapis.com/css?family=Staatliches" rel="stylesheet">

And add this to a Hook Element int the WP_head hook and set the Display Rules for the entire site

https://docs.generatepress.com/article/hooks-element-overview/

Then create a CSS class for the font e.g:

.staatliches {
	font-family: 'Staatliches', cursive;
}

Then within your Text Editor you can do this:

<p class="staatliches">Here is some text in staatliches</p>

Or for a single word this:

<p>This is my normal font and this <span class="staatliches">word</span> is not</p>

This archived topic is closed to new replies.