在主題資料夾中新增【fonts】的資料夾,並將字形放入

然後打開主題資料夾內的style.css,貼上以下代碼

其中”NotoSerifCJK.otf” 更改為要設定的字形名稱

@font-face{
	font-family: "NotoSerifCJK";
	ser:  url('fonts/NotoSerifCJK.otf') format('truetype');
}

最後打開主題資料夾內的functions.php,貼上以下代碼

其中”NotoSerifCJK” 更改為要設定的字形名稱

//Add custom font to font settings
function ocean_add_custom_fonts(){
    return array('NotoSerifCJK');
}

接下來網站>自訂>排版 裡面就能找到自訂的字形設定給網站了

最後修改日期: 2022 年 10 月 31 日

作者