Skip to content

A field for Advanced Custom Fields which allows you to select Google fonts with advanced options

License

Notifications You must be signed in to change notification settings

Web-Ventures/acf-google_font_selector

Repository files navigation

ACF - Google Font Selector Field

Welcome to the Google font selector for Advanced custom fields. For information about the base plugin which is required for the role selector to work, take a look at ACF on Github or the official ACF Homepage.

The plugin allows you to create a Google font selector field with different options. The plugin also created the font request in the theme header (unless disabled). Font variants and charsets can be selected separately to make font loading more flexible and optimized.


Once installed you should define a constant for the Google API key used to retrieve fronts from the Google API. By default the request will use my API key but if many people start using the plugin it may get rate limited. Plese define ACF_GOOGLE_FONTS_API_KEY somewhere. It's super easy to get an API key, just head on over to the Google API Console, create a new project and get a browser api key.

define( 'ACF_GOOGLE_FONTS_API_KEY', 'your_google_api_key' );

If the ACF_GOOGLE_FONTS_DISABLE_HEADER constant is defined as true the Google font request will not be added to the theme header. If it is defined as false or is not defined the font request will be added

define( 'ACF_GOOGLE_FONTS_DISABLE_HEADER', true );


Special thanks to Elliot Condon for making the wonderful ACF plugin in the first place.

About

A field for Advanced Custom Fields which allows you to select Google fonts with advanced options

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published