Skip to content

Instantly share code, notes, and snippets.

@towfiqpiash
Last active October 4, 2017 18:25
Show Gist options
  • Save towfiqpiash/ad83fbd8454f98e989cbd3808d0d5127 to your computer and use it in GitHub Desktop.
Save towfiqpiash/ad83fbd8454f98e989cbd3808d0d5127 to your computer and use it in GitHub Desktop.
How to add custom font to wordpress
/*
Follow these steps:
--------------------
1. Convert ttf font (e.g. solaimaniLipi.ttf) to woff using any of font-face generator tool online
2. Upload solaimaniLipi.woff to themename/assets/fonts/solaimaniLipi.woff
3. Add @font-face code to themename/style.css
4. Use font-family name anywhere you want to use this font
*/
@font-face {
font-family: solaimaniLipi;
src: url(assets/fonts/SolaimanLipiNormal.woff);
font-weight: normal;
}
Add this in Additional Code > Custom CSS
-----------------------------------------
@font-face{
font-family: SolaimaniLipi;
src: url(https://hoimonti.com/wp-content/themes/negan/assets/fonts/SolaimanLipiNormal.woff);
font-weight: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment