Advanced Custom Fields: Typography Field
Advanced Custom Fields: Typography Field
Description
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
Compatibility
This ACF field type is compatible with:
* Free and paid versions of the ACF plugin
Installation
- Copy the
acf-typography-fieldfolder into yourwp-content/pluginsfolder - Activate the Typography plugin via the plugins admin page
- Google API Key is required for Google Fonts. Please add one by going to
WordPress Admin Dashboard > Settings > ACF Typography Settings - Create a new field via ACF and select the Typography type
- Please refer to the description for more info regarding the field type settings
Screenshots
Faq
A. Yes. This plugin is compatiable with both free and paid ACF plugins.
A. Version 3.0.0 and greater supports Google Fonts
A. Google API Key is required for Google Fonts. Please add one by going to WordPress Admin Dashboard > Settings > ACF Typography Settings
A. Yes. This plugin automatically enqueues user selected Google Fonts to front-end of posts/pages.
A. Yes. This plugin does support Gutenberg Blocks created with ACF.
A. Join in on Github repository @mujahidi/acf-typography
Reviews
Does not Enqueue Font(s) Selected
By zdmdesigns (zmdesignz) on July 26, 2024
Great plugin. Does exactly what it says, which is very powerful!
Not bad
By classikd on May 23, 2024
Great but font-weight changes are not taken into account in google fonts call...
Very nice
By proyinfo on February 7, 2023
Works very well. However, on the Font API settings page, you could add some instruction to get the key.
Simple, but works well
By AndyiBM on August 3, 2022
Does what it says
By jimleeder123 on January 29, 2019
Changelog
3.2.3
- Added new font-weight values
3.2.2
- Fixed google fonts url too long issue
3.2.1
- Fixed typo and bugs
3.2.0
- [NEW] Added ‘initial’ and ‘inherit’ values for ‘font-family’ property.
- [NEW] Added support for ACF Blocks.
- [BUG] Fixed a PHP notice when any post does not have ACF Typography fields setup.
3.1.0
- [NEW] Google Fonts support for ACF Options
- [BUG] Different font weights were not enqueued when used in a repeater field
3.0.0
- [NEW] Introduces functions and shortcode
- [NEW] Hides nonselected properties in fieldgroup edit page
- [NEW] Supports Google Fonts
- [NEW] Enqueue google fonts CSS on page/post
2.2.0
- [NEW] Font Stretch subfield
2.1.0
- [NEW] Font Variant subfield
2.0.0
- [NEW] Now supports ACF 5 (Pro version)
1.1.1
- Fixed a bug
1.1.0
- [NEW] Text Transform subfield
1.0.0
- Initial Release.


