Skip to content

Style Icons with WordPress

Font Awesome has a ton of great styling tools that work hand-in-hand with our icons to make your project look its best.

With the official 4.0 release of the WordPress plugin, you can add attributes to the icon shortcodes, including CSS classes.

This means you can make your icons extra fancy with all the features that Font Awesome offers via CSS classes, like:

Here’s an example:

[icon name="yin-yang" prefix="fas" class="fa-2x fa-spin"]

Here are attributes that can be passed through the shortcode:

AttributeHow you can use it
classEither your own or Font Awesome-specific CSS classes
styleFor your own custom CSS
title , aria-hidden , aria-labelledby , roleAccessibility helpers
Icon name and style prefixBasic Font Awesome attributes