Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1122851

    Hi there!
    I’ve been going round and round on this one for a week now and am hoping you can help me out. I’m trying to apply a custom class to my H1 tags for select headlines to make them in a script font. Here’s what I’ve done so far…

    Added the following code to Functions File:

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Dancing Script’] = ‘Dancing Script:400,700’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Dancing Script’] = ‘Dancing Script:400,700’;
    return $fonts;
    }

    Added this to my General Styling CSS:
    .script-font-susan h1 {
    font-family: ‘Dancing Script’ !important;
    font-size: 65px !important;
    color: #41bfbb !important;
    }

    And tried applying the font to the text blocks on a page like this:
    <h1 class=”script-font-susan”>Hi, I’m Susan.</h1>

    I have some general settings lined up for my H1’s in the Advanced Layout Editor section, but don’t specify font aside from “Default”.

    Any ideas on what I’m missing here and why this font won’t show OR suggestions on a better alternative? Thanks in advance for the support!

    ~L

    #1123026

    Hey LesleyJean,

    Please try this CSS instead:

    h1.script-font-susan {
      font-family: ‘Dancing Script’ !important;
      font-size: 65px !important;
      color: #41bfbb !important;
    }

    Also make sure that you clear the old CSS and JS files under Enfold->Performance before checking the results.

    Best regards,
    Rikard

    #1123360

    Thanks for sending that over. I made the update, but still no luck. I’ve included the login credentials below for your reference and troubleshooting. Can you help me figure out where I’ve gone wrong here please? Thanks in advance!

    #1123585

    Hi LesleyJean,

    The font is not loading on that page, you need to assign some element to have that font in the Theme options > Advanced styling.

    Best regards,
    Victoria

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