WordPress PHP教學:用wp_enqueue_style設定font-awesome跟google-font方法

在wordpress中,可以在/public_html/wp-content/themes/主題名稱/functions.php中,統一設定讀取font-awesome跟google-font方法。

wp_enqueue_style()設定方法

 wp_enqueue_style('GOOGLE-FONT名稱', '//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');

  wp_enqueue_style('font-awesome名稱', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');

wp_enqueue_style()方法來源

Enqueue a CSS stylesheet

Related Post

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *