[Support request] Using multiple fonts for content

Home Forums Support [Support request] Using multiple fonts for content

Home Forums Support Using multiple fonts for content

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #773046
    Johnny

    I want to use multiple fonts for my content.

    For example, for certain sentence I wish to use this font: https://fonts.google.com/specimen/Indie+Flower

    For some wording, I want to use this font: https://fonts.google.com/specimen/Staatliches

    I need to highlight certain wordings using CSS.

    What is the best way to do it using GeneratePress?

    #773120
    David
    Staff
    Customer Support

    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>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.