Cách cài fontawesome-pro-5.12.0 vào wordpress

fontawesome là một bộ font và icon.

Cách cài vào wordpress:
B1: Tạo Child theme
B2: Copy file header.php ở thư mục theme cha vào child theme
B3: Chèn đoạn mã sau.

plaintext
<link rel="stylesheet" type="text/css" href="https://ndata1.imfast.io/design/ICON/fontawesome-pro-5.12.0/fontawesome-pro-5.12.0-web/css/all.css">

Sau khi copy như thế này là đã thành công. Chú ý phần url dẫn tới file all.css nên để đường dẫn tuyệt đối.

plaintext
...
<head>
     ...
    <?php wp_head(); ?>
    <link rel="stylesheet" type="text/css" href="https://ndata1.imfast.io/design/ICON/fontawesome-pro-5.12.0/fontawesome-pro-5.12.0-web/css/all.css">
</head>
...

Note:
Nêu sau khi thực hiện các bước trên mà vẫn lỗi thì tải thư mục webfonts vào thư mục của child theme.

Nguyen Pham

Xin chào. Mình thích lập trình và công nghệ. Đây là blog mình chia sẻ lại các kiến thức về lập trình, công nghệ.