[英]Changing Font in Wordpress Theme
我目前正在使用Wordpress“方形”主題: https : //hashthemes.com/wordpress-theme/square/
我希望在導航菜單,下拉菜單以及帖子/頁面中修改字體。
我有所需字體的真實類型文件,但不確定如何修改CSS以實現所需的字體。
任何幫助表示贊賞!
謝謝,
莫
您可以嘗試在style.css或自定義css文件中添加字體系列,我在這樣的主題中使用了此true type腳本
<script src="https://use.typekit.net/uhs1xwe.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
在css文件中,我像這樣使用字體
.header_menu ul li {
float: left;
text-transform: uppercase;
font-size: 14px;
letter-spacing: 1px;
font-weight: 500;
padding: 0 18px 0 0;
font-family: "sofia-pro";
}
在style.css中,編寫以下代碼:
@font-face {
font-family: FontName;
src: url(public_html/your-site/wp-content/themes/your-theme/fonts/FontName-Regular.ttf);
font-weight: normal;
}
然后使用
body{font-family: FontName !important;}
看到這里http://www.wpbeginner.com/wp-themes/how-to-add-custom-fonts-in-wordpress/ https://premium.wpmudev.org/blog/custom-fonts-css/?utm_expid = 3606929-109.P6e7JvhjTrWFxwrJZjRkog.0&utm_referrer = https%3A%2F%2Fwww.google.co.in%2F
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.