How to install external fonts in wordpress?

Codelapa | iStock 1132326698 | Desenvolvimento de E-commerce

If you’re a web developer, you know that some clients can be very demanding and want a font that doesn’t exist in your theme…

When that happens, we turn to external fonts — it’s very simple to install and configure.

1° Find and download the font you want — make sure you have the .TTF file.

2° Upload the font to a folder on your site using FTP or a file manager plugin.

3° Add the CSS to load the font. Here’s the code:

@font-face {
  font-family: 'yourfontname';
  src: url('/wp-content/uploads/2020/10/yourfontname'); /* folder where the font is uploaded */
}
h1, h2, h3 {
  font-family: 'yourfontname';
}

4° Have fun applying your font-family to any classes or IDs you like!

Leave a Reply

Continuando a usar, você concorda que codelapa.com.br pode armazenar cookies em seu dispositivo e divulgar informações de acordo com nossa Política de Cookies.