A custom field type for Advanced Custom Fields (ACF) Pro that adds a Feather Icon picker. This field allows you to easily select from the complete collection of Feather Icons in your WordPress admin.
- Beautiful and user-friendly icon picker interface
- Search functionality to quickly find icons
- Category filtering to browse icons by type
- Returns either HTML markup or icon class name
- Fully responsive design
- Compatible with the latest WordPress and ACF Pro versions
- Translations available (currently: English, Brazilian Portuguese)
- WordPress 5.0 or later
- Advanced Custom Fields PRO 5.0.0 or later
- PHP 7.0 or later
- Download the plugin
- Upload the plugin files to the
/wp-content/plugins/acf-feather-icon-field
directory - Activate the plugin through the 'Plugins' screen in WordPress
- The field type will now be available in ACF field group settings as "Feather Icon"
- Create a new field group in ACF
- Add a new field and select "Feather Icon" as the field type
- Configure the field settings:
- Return Format: Choose between "Icon HTML" or "Icon Class"
- Icon HTML returns:
<i data-feather="icon-name"></i>
- Icon Class returns:
feather-icon-name
When using the "Icon HTML" return format, make sure to include the Feather Icons JavaScript in your theme:
<script src="https://unpkg.com/feather-icons"></script>
<script>
feather.replace();
</script>
<?php
// Get the icon
$icon = get_field('your_field_name');
if ($icon) {
// If return format is "Icon HTML"
echo $icon;
// If return format is "Icon Class"
echo '<i class="' . esc_attr($icon) . '"></i>';
}
?>
The plugin comes with the following translations:
- English (default)
- Brazilian Portuguese (pt_BR)
To add a new translation:
- Copy the
languages/acf-feather-icon.pot
file - Rename it to
acf-feather-icon-{locale}.po
(e.g.,acf-feather-icon-fr_FR.po
for French) - Translate the strings in the file
- Generate the .mo file using a tool like Poedit or WP-CLI
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
- Feather Icons - Beautiful open source icons
- Advanced Custom Fields - The best custom fields plugin for WordPress
Created by Rhuan Carlos