Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to add a font into my theme. Please let me know if this is just as simple as uploading the font to a new folder named "fonts" and then changing the css and renaming the font-family property there or it's somewhat different procedure. I am not sure about it. Please help me.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

To use a custom font, simply upload the font to your theme folder and then add a CSS @font-face declaration to the top of your theme's style.css file pointing to the new font:

@font-face {
font-family: CustomFont;
src: url('CustomFont.ttf');
}

You can then reference that custom font in other CSS styles, for example:

.entry-content { font-family: "CustomFont", sans-serif; }
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.