Wordpress安装自定义字体
0x00.下载所需字体 ,确保FTP服务器可用
0x01.将字体文件上传至FTP服务器
0x02.在主题目录下新建fonts文件夹
mkdir fonts
0x03.复制字体文件至fonts文件夹
cp xxx.ttf /www/wwwroot/async.website/wp-content/themes/xxx/fonts
0x04.修改fonts文件夹权限
chmod -R 777 fonts
0x05.在主题的style.css中添加@font-face
@font-face {
font-family: xxx;
src: url(http://xxxx.xxx/wp-content/themes/xxx/fonts/xxx.ttf); /*修改url为自己的字体路径*/
font-weight: normal;
}0x06.在所需地方引用,如需要修改style.css中site-description的字体
.site-description {
display: inline-block;
margin-top: 15px;
margin-bottom: 0;
font-size: 50px;
font-family:Debby;
line-height: 1.1;
}
Wordpress安装自定义字体
https://blog.async.website/index.php/archives/453/