[WordPress] 外掛分享: Font Awesome

首頁外掛目錄 › Font Awesome
WordPress 外掛 Font Awesome 的封面圖片
400,000+
安裝啟用
★★★☆☆
3.6/5 分(61 則評價)
91 天前
最後更新
33%
問題解決
WordPress 5.8+ PHP 7.4+ v5.1.3 上架:2012-09-17

內容簡介

這是一個官方的 WordPress 外掛,讓你可以使用 Font Awesome Free 或 Pro 圖示,由 Font Awesome 團隊提供。此外掛提供以下功能:

使用 Pro 或 Free 的圖示
使用最新版本或指定版本的圖示
可選擇使用 SVG 或 Web Font 技術
使用經典的 Font Awesome CDN 或 Font Awesome Kits 來載入圖示,後者是在網頁上使用 Font Awesome 圖示最簡單有效的方法
如果你或你的外掛仍在使用版本 4 語法,外掛會自動相容
當其他外掛/主題正在載入多個 Font Awesome 版本時,可排除多個版本的圖示顯示問題或技術問題
使用 Font Awesome Version 6 的圖示
使用從 Pro Kits 上傳的圖示

如何使用此外掛:

安裝並啟用外掛
在文章或頁面中新增圖示,支援區塊編輯器和經典編輯器
在任何文字區塊中使用格式欄的 Font Awesome 選項打開圖示選擇器。輸入 Pro 圖示查詢需使用 Pro Kit。
或者使用 shortcode 或 HTML 程式碼添加圖示

使用 Pro 圖示時,需在 FontAwesome.com 上新增 Kit,然後在 WordPress Kit 設置中選擇 "Pro icons",再從 Font Awesome 帳戶頁面中取得 API Token,加入 WordPress Kit 設置。使用 CDN 載入 Pro 圖示,需在 Font Awesome 帳戶 CDN 設置頁面上添加網域,用 shortcode 或 HTML 代碼添加圖示到內容中。如果使用圖示選擇器,需使用 Pro Kit。此外掛可以幫助使用者排除外掛或主題載入多個版本 Font Awesome 時產生的衝突。

外掛標籤

開發者團隊

⬇ 下載最新版 (v5.1.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Font Awesome」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The official way to use Font Awesome Free or Pro icons on your WordPress site, brought to you by the Font Awesome team.
Features
Our official plugin makes it easy to add Font Awesome icons to your pages, posts, and templates and includes the following features:

Use Pro or Free icons, from the latest release or a specific release.
Use custom icons from your Pro Kits.
Use a Font Awesome Kit to add any of our icons (including the latest Duotone styles and custom icons!), or select the Font Awesome CDN for Version 5 icons only.
Turn on automatic compatibility for Font Awesome Version 4 if you – or your plugins – are still using Version 4 syntax.
Troubleshoot and resolve issues when multiple versions of Font Awesome are loading on your site from other plugins/themes, which can cause unexpected icon display or technical issues.

How to Use
Install And Enable The Plugin
(See the Installation tab for details)
How to Add and Style Icons
Full docs on how to use the plugin and add icons are available on the Font Awesome Docs site.
Add Icons in the Block Editor
Once you’ve set up your plugin, you can add icons as blocks or inline with text.
To add icons as blocks, select the “Font Awesome Icon” block, and then click the “Choose Icon button” to open the Icon Chooser.
To add icons inline, select the Font Awesome option in the format toolbar to open the Icon Chooser. (Note: Inline icons require at least WP 6.3.)
Once you open the Icon Chooser, add icons by:

Searching for the icon you want – you can search by icon name, category, or keyword.
Changing the Family and Style using the drop downs if you want an icon in a different style.
When you see the icon you want, clicking it to enter it into the content of your page or post.

Note: If you want to search and add Pro icons in the Icon Chooser, make sure you set your plugin to use a Pro Kit.
Add Icons in The Classic Editor
If you need to add icons in the classic editor, you can use the icon names in shortcodes or HTML. Add an icon using shortcodes to any text area – just add the name of the icon and a style prefix, where the prefix is the style of icon you want to use. Note that you don’t need to include the fa- part of the icon name. And if you don’t include any style prefix, the icon will default to the Classic Solid style.
The shortcode for an icon looks like this:
[icon name="stroopwafel"]

[icon name="stroopwafel" prefix="fa-sharp fa-light"]

You can also use basic HTML with standard Font Awesome syntax, like this:

Using Pro Icons and Features
To use a Kit to power your icons, create a Kit on FontAwesome.com and select “Pro icons” in the Kit Settings tab. Then grab your API Token from your Font Awesome Account page and add it to your WordPress plugin settings.
To use the CDN to power your icons, know that you will only be able to use icons from Version 5. To enable Pro icons, add your site’s domain to the list allowed domains on your Font Awesome CDN Settings page and then use shortcodes or HTML to add the icons into your content.
Troubleshooting with the Plugin
Font Awesome icons are popular, so lots of themes and plugins also load Font Awesome, and sometimes their version can conflict with yours. So we created a way to help you find and prevent those conflicting versions from affecting your icons: The Conflict Detection Scanner.
If the plugin seems to be set up correctly and your icons still aren’t loading and you’re not sure why, head over to the Troubleshoot tab, which has two parts:

Detect Conflicts with Other Versions of Font Awesome – which lets you start the conflict detection scanner to find versions of Font Awesome loading on your site.
Versions of Font Awesome Active on Your Site – which shows the results of the scanner and lets you prevent any conflicting versions from loading other versions of Font Awesome on your site.

Get more information about using the scanner for troubleshooting on the Font Awesome WordPress docs.
Configuring
The plugin is set to serve Font Awesome Free icons as a Web Font via the Font Awesome CDN by default. You can change the CDN settings right in the plugin. If you want just the basic Free icons, you probably don’t need to make any changes to the default configuration.
You can get more information about all the available settings and troubleshooting on the Font Awesome WordPress docs.
Upgrading from Plugin Version 4

[icon] shortcodes found in Block Editor content and elsewehre will continue to work as before,
though new icons added with the Icon Chooser in the Block Editor will be inline SVGs.
Previously added [icon] shortcodes will not be automatically be converted into the new inline SVG
format. If you want to convert an [icon] shortcode, delete it and re-add the icon using the Icon Chooser in the Block Editor.

See Also
The README on GitHub has details for WordPress site owners and developers.
You can get more information about all the available settings and troubleshooting on the Font Awesome WordPress docs.
And there are API docs for developers.

延伸相關外掛

文章
Filter
Mastodon