T
T
toster1112018-10-16 10:22:40
Fonts
toster111, 2018-10-16 10:22:40

How to properly connect your font to a Wordpress site?

Good afternoon.
There was a problem connecting your font to the site. It seems that I am doing everything correctly, as it is written in most sources, but the font does not work. Site on wordpress, prolific theme, maybe there is some problem in this?
I uploaded the font file to the fonts folder, which is located in the same folder as style.css.
I am attaching the code I used.

@font-face{
  font-family: Hair-2;	
  src: url(../fonts/Hair-2.ttf) format('truetype');
  font-weight: normal;
  font-style: normal;
}

#slider li p{
  font-family: Hair-2, arial;
}

I read a lot of articles, but did not find the reason. Hope for help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
azaza, 2018-10-16
@toster111

remove ../
src: url('fonts/Hair-2.ttf') format('truetype');

V
Vladislav Lyskov, 2018-10-16
@Vlatqa

I uploaded the font file to the fonts folder, which is located in the same folder as style.css.

src: url(../fonts/Hair-2.ttf) format('truetype');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question