How to add custom font to WordPress

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;
}

Comments

comments

Author: ionut_d

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.