Default fonts

On this site http://lowendentalspa-co-uk.ntc11-p1rea.seeinside.co.uk
I’m trying to use a font like https://fonts.google.com/specimen/Spartan?query=spartan

After reading an old answer here I added to functions.php in my child theme…

add_filter (‘x_fonts_data’, ‘Spartan’, 9999 );

function Spartan ($fonts) {
$fonts[ ‘Spartan’ ] = array(
‘source’ => ‘google’,
‘family’ => ‘Spartan’,
‘stack’ => ‘“Spartan”, sans-serif’,
‘weights’ => array( ‘100’, ‘300’, ‘600’’ )
) ;

return $fonts;
}

That sort of works.

As an alternative I’ve also uploaded gothic.woff files. I could use that if necessary.

The issue I have is that I specified the heading and body font but several of the default texts here http://lowendentalspa-co-uk.ntc11-p1rea.seeinside.co.uk display in Times New Roman. How do I make the default one of my preferences?

Hello @redleaf,

Thanks for writing in! Once you added the font in your font manager, you must assign the heading and body & content in X > Theme Options > Typography to your newly added font as well. To know more about the Typography and the Font Manager, kindly check out this documentation:

By the way, Spartan font were added to Google prior to our previous update release which is why it is not included in the font manager. You may no longer need the code when we release our latest updates which will be rolling out in the next few weeks.

Best Regards.

Hi - the font is specified under Body see attached but I still don’t see it displayed for instance here http://lowendentalspa-co-uk.ntc11-p1rea.seeinside.co.uk/news/ What am I missing? :slight_smile:

Hello @redleaf,

In order to help you further with your concern, please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts

Thanks

Secure note added

Hello @redleaf,

Thanks for sharing the credentials. I went ahead and tested with different google fonts and it is working fine please have a look at the given screenshot below

It seems that Spartan Font does not come with any subset or styles which you required. I would suggest you download the Font from https://fonts.google.com/specimen/Spartan and upload it to your site.

Please have a look at how a custom font can be added from the Custom Font section of this article: https://theme.co/docs/font-manager#enabling-font-manager-in-the-theme-options.
.woff and .woff2 is the format we recommend but the other format file is still working

For reference, you can have a look at this thread

Hope it helps
Thanks

Thanks - much better now.

Hi @redleaf,

You’re welcome and it’s our pleasure to help you. If you have any other concerns, feel free to reach us.

Thank you.

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