![]() If you are a theme author who wants to bundle this plugin with your theme, starting in version 4.0.1 this plugin has been designed to work from within a theme directory. Create a new field via ACF and select the Font Awesome type.Activate the Font Awesome plugin via the plugins admin page.Copy the advanced-custom-fields-font-awesome folder into your wp-content/plugins folder.NOTE: This filter must be registered before any calls to ACF get_field() function are made. ACFFA_override_major_version: Filter to manually set the ‘major’ version of FontAwesome to load (accepts either 4, 5, or 6).ACFFA_get_fa_url: Filter the URL used for enqueuing FontAwesome in the frontend and admin areas of the site.ACFFA_get_icons: (Applies to FontAwesome 4.x and 5.x icons only) Filter the array of icons and icon details loaded from the database.Useful if you already have FontAwesome enqueued by some other means. ACFFA_admin_enqueue_fa: Return false to stop enqueueing FontAwesome in the admin area.This will enqueue FontAwesome in the header instead of the footer. ACFFA_always_enqueue_fa: Return true to always enqueue FontAwesome on the frontend, even if no ACF FontAwesome fields are in use on the page.* FontAwesome 4.x and 5.x and 6.x fonts Optional Configuration Filters Note: It is recommended to let this plugin enqueue the latest version of Font Awesome on your front-end or include the latest version yourself using your FontAwesome Kit so that available icons in the admin area will be displayed properly on your sites front-end. Integrates with the FontAwesome GraphQL for loading your FontAwesome Kits, searching for icons, and loading the latest version of FontAwesome.Optionally enqueues Font Awesome in footer where needed (when a FontAwesome field is being used on the page)).Returns Icon Element, Icon Class, Icon Unicode, or an Object including the element, class, unicode value, and SVG data (if applicable).Use different custom icon sets with different fields Create your own custom filtered list of FontAwesome icons to use with your fields.Specify which FontAwesome icon sets to use (Solid, Regular, Light, Thin, Duotone, Brands, and Custom Upload Icons) (Some features only available with FontAwesome 5.x or 6.x icons).Let me know if you have any questions below.Add a Font Awesome icon field type to Advanced Custom Fields. There you go! You’ve now added Font Awesome and all its muscle to your site. Check out additional examples to see how you can increase the size, add a spin, and even superimpose them! They have over 360 icons to choose from, so you’ll be able to find the one you’re looking for. The ‘fa’ identifies the code as an icon, while the ‘fa-camera-retro’ pulls the actual icon image. This is the most basic icon that you can output. Add Iconsįont awesome uses a very simple method for implementing a new icon using HTML. Save the file and now you’re ready to use the icons! 2. Finally, place this code into the header.php file : Then, FTP to your server and upload the new folder to /wp-content/themes/your-theme. First, download the latest version of the stylesheet and unzip it. This method doesn’t depend on an external source to load and depends only on your server speed. Option 2 – Self Hosted CSS Stylesheet This option requires that you download the Font Awesome CSS stylesheet, add it to your server via FTP, and call the file pathway correctly in order to utilize the new font. Save the file and now you’re ready to use the icons! Simply add this code to the header.php file: It is the easiest method of installation, but depends on another site to load the file and may slow your site load speed. Option 1 – Bootstrap CDN This option will rely on the Bootstrap CDN (content distribution network) to load the Font Awesome CSS stylesheet from an external server. Here’s a quick how to guide on installing Font Awesome 4.0: 1. It allows you to add beautiful, scalable icons to your WordPress website, while allowing you to treat them as a font! This means that you can change their color, size, line-height, font-weight, and even add special effects like rotate and spin! Oh, and you can totally superimpose two icons on top of one another. Font Awesomeis awesome and you’re in luck if you landed here wanting to find out how to add Font Awesome to your site.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |