| Subcribe via RSS .

How to add custom font to WordPress

4 May 2020 | Scris de: ionut_d | Comenteaza primul
Postat in Blogging, IT, Internet, Gadgets, Wordpress

Upload via ftp the *.ttf font to a location on server, for example /var/www/website/wp-content/themes/fonts/

Once the file is uploaded add to the stylesheet (style.css) the following:

@font-face {
font-family: Custom Font;
src: url(http://www.yourwebsite.com/wp-content/themes/fonts/custom-font.ttf);
font-weight: normal/italic/bold;

Call it where needed:

.h1 site-title {
font-family: "Custom Font", Arial;