How to add EB Garamond font to element

Hi everybody, I’m having a little trouble getting a font to materialize on my website… afreemankind.com

I am trying to replicate the contents of my Revolution Slider into just a normal section in Cornerstone (I don’t need the slider anymore, seeing as there are no slides and the plug-in/animation I think is slowing down my website needlessly). So basically, I’m just trying to reproduce exactly what you see when you first visit the website, but without using Revolution Slider. I know how to do most of it, but I can’t figure out how to carry the font over (which is EB Garamond) when I am recreating the slider content in a Cornerstone section. I hope that makes sense.

Thanks for the help.

Hi there,

Thanks for writing around! To add a custom font, add the following code in your Child Theme’s functions.php file:

<?php
add_action('wp_head','custom_font');
function custom_font() { 
?>
	<link href="https://fonts.googleapis.com/css?family=EB+Garamond" rel="stylesheet">
<?php 
}

Use the following CSS rules to specify this font:

font-family: 'EB Garamond', serif;

Hope this helps!

Yes it does, thank you sir.

You’re more than welcome, glad we could help.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.