[WordPress] 外掛分享: Advanced Custom Fields: Typography Field

首頁外掛目錄 › Advanced Custom Fields: Typography Field
WordPress 外掛 Advanced Custom Fields: Typography Field 的封面圖片
3,000+
安裝啟用
★★★★
4.6/5 分(5 則評價)
739 天前
最後更新
問題解決
WordPress 3.5.0+ v3.2.3 上架:2016-10-16

內容簡介

「Advanced Custom Fields」外掛的排版類別欄位,讓你新增不同的文字屬性,例如字型大小、字型家族、字體顏色等。

支援的子欄位

字型大小
字型家族
字型粗細
字型樣式
字型變化
字型伸展
行距
字寬
文字對齊
文字顏色
文字裝飾
文字大小寫轉換

其他特點

支援 Google Fonts。所選的 Google 字型會自動添加至文章/頁面前端,並且 ACF 選項中的 Google Fonts 也可以使用。
支援使用 ACF 建立的 Gutenberg 區塊。
個別顯示或隱藏每個子欄位的選項。
個別設置每個子欄位是否必填。
文字顏色子欄位的顏色選擇器。

文件
// 返回特定屬性的值
get_typography_field( $selector, $property, [$post_id], [$format_value] );

// 顯示特定屬性的值
the_typography_field( $selector, $property, [$post_id], [$format_value] );

// 從子欄位中返回特定屬性的值
get_typography_sub_field( $selector, $property, [$format_value] );

// 從子欄位中顯示特定屬性的值
the_typography_sub_field( $selector, $property, [$format_value] );

短碼
[acf_typography field="field-name" property="font_size" post_id="123" format_value="1"]

Github 版本庫

@mujahidi/acf-typography

相容性

此 ACF 欄位類型相容於:
* ACF 外掛的免費和付費版本

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.2.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Advanced Custom Fields: Typography Field」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Typography field type for “Advanced Custom Fields” plugin that lets you add different text properties e.g. Font Size, Font Family, Font Color etc.
Supported Subfields

Font Size
Font Family
Font Weight
Font Style
Font Variant
Font Stretch
Line Height
Letter Spacing
Text Align
Text Color
Text Decoration
Text Transform

Other Features

Supports Google Fonts. The selected Google Fonts are automatically enqueued on front-end of posts/pages. Google Fonts also work with ACF Options.
Supports Gutenberg Blocks created with ACF.
Option to show/hide each subfield individually
Option to make each subfield required individually
Color Picker for Text Color subfield

Documentation
// Returns the value of a specific property
get_typography_field( $selector, $property, [$post_id], [$format_value] );

// Displays the value of a specific property
the_typography_field( $selector, $property, [$post_id], [$format_value] );

// Returns the value of a specific property from a sub field.
get_typography_sub_field( $selector, $property, [$format_value] );

// Displays the value of a specific property from a sub field.
the_typography_sub_field( $selector, $property, [$format_value] );

Shortcode
[acf_typography field="field-name" property="font_size" post_id="123" format_value="1"]

Github repository
@mujahidi/acf-typography
Compatibility
This ACF field type is compatible with:
* Free and paid versions of the ACF plugin

延伸相關外掛

文章
Filter
Mastodon