-
AuthorPosts
-
July 29, 2019 at 6:49 pm #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
July 30, 2019 at 3:59 am #1123026Hey 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,
RikardJuly 30, 2019 at 11:35 pm #1123360Thanks 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!
July 31, 2019 at 5:10 pm #1123585Hi 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 -
AuthorPosts
- You must be logged in to reply to this topic.