Skip to content

An ACF extension to allow the use of arbitrary CSS font icon libraries

Notifications You must be signed in to change notification settings

joshtorres/acf-custom-font-icons

 
 

Repository files navigation

***This is under active development. Use it on production sites at your own risk.

ACF Custom Font Icons

This is a plugin that allows you to use custom font icons (as opposed to just font awesome) in your custom fields.

***This is built to only work with ACFv5

Using the plugin

There are 2 options you must set

  1. Font CSS File Location is a relative path to the css file that has the font classes in your theme.
  2. CSS Class Prefix (optional) is the font prefix you need to use in the css class (fa) this will default to fa
  3. CSS Class Filter (optional) is the class to filter by. It will only show icons that use this class. This will default to icon

Thats it, go use your awesome fonts.

Writing your template

ACF will return a value in this form fa fa-cool-icon that you can use however you please. I recommend something like <i class="fa fa-cool-icon"></i> but it's really up to you.

License

This is code is released under the MIT License. Sections of it are licensed under other, compatible Open Source licenses.

About

An ACF extension to allow the use of arbitrary CSS font icon libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 80.4%
  • JavaScript 18.2%
  • CSS 1.4%