NOTE: This tutorial is depreciated and no longer needed due to a Divi update.

Our blood, sweat, and tears helped many of you. But ultimately updates like this are progress in the right direction for Divi!

How To Replace The Divi Blurb Icon With A Font Awesome Icon Tutorial by Pee Aye Creative

How To Replace The Divi Blurb Icon With A Font Awesome Icon

Nelson Miller Pee Aye Creative
In this tutorial you will learn how to replace the Divi Blurb module icon with any Font Awesome icon of your choosing!

Join subscribers on our YouTube channel and enjoy other Divi video tutorials!

Connect Font Awesome To Divi

Since this guide is all about replacing the standard icon with a Font Awesome icon, the first step would be to ensure that you have Font Awesome connected to your Divi website.

We have a dedicated guide about How To add Font Awesome Icons To Divi. Once you have that connected you can proceed to the other steps.

How To Connect And Add Font Awesome Icons To Divi Tutorial by Pee Aye Creative

Add A Custom CSS Class To The Blurb Module

Now go to the desired Divi Blurb module and open settings. Go to the Advanced tab and open the CSS ID & Classes toggle. There you can write your custom class.

It is necessary for this class to match the one used in the code snippet. In our snippet, we have used the class “pa-blurb-icon” and so this same class needs to be add here.

We give this custom class to make sure that our custom code will not affect the element that we don’t want to change.

3. Enable Use Icon And Choose Any Icon

By default, the Divi Blurb module is set to use an image. So first, go to the Image and Icon toggle in the Content tab and click on the “Use Icon” toggle. 

Next, because of how this method works, we need to actually assign an icon to the Divi Blurb module before we can replace it. For this step, simply choose any random icon. The key is to actually click on one, because by default there is not any selected.

use Font Awesome icon in Divi Blurb module

4. Use JQuery To Remove Existing Icon And Replace With New

The next step is to remove the icon that is currently used in the Divi Blurb module and replace it with one from Font Awesome. You may think this should be possible with just CSS, but unfortunately because of the way the icon is structured it is not. So we must use the jQuery snippet below to achieve this.

Where To Paste The jQuery Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the jQuery tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the scripts.js file (don't forget to remove the <script> tags at the beginning and end). If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Divi Theme Options Integration
Otherwise, paste this code in your Divi>Theme Options>Integrations tab in the "Add code to the < head > of your blog" code area.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom code In Divi.

<script>
jQuery(document).ready(function(){
    jQuery(".pa-blurb-icon .et-pb-icon").remove();
    jQuery(".pa-blurb-icon .et_pb_image_wrap").prepend("<span><i class='fas fa-bacon'></i></span>")
})
</script>

What Is Happening Here?

The remove() line in the code is removing the existing default icon of the blurb module. After that, we are prepending or placing our Font Awesome icon in the same div where the default icon used to be located.

Change The Icon

The only part of this snippet that you should change is between the <span> tag. Notice in this example the icon code copied from Font Awesome is <i class=’fas fa-bacon’></i>.

Where To Find The Icon Code?

To find this code, go to the Font Awesome website and find the icon that you want to use. From there you will see the HTML code and you can just click to copy it.

choosing the icon code on Font Awesome.png

So just place that between the <span> tags and you are all done!

6. Repeat This Process For Each Blurb

If you want to do this for more than one blurb, no problem! You will just repeat some of the steps for each one. Make sure to assign a different unique class to each blurb module, and them make sure you update that class in the duplicate jQuery snippet.

7. Style The Icons

Now of course you probably want to make the icons look good. Since we are not using the default icons, we can’t just use the design settings in the module. You will need to sue CSS for this. You can target the icon like this example:

Where To Paste The CSS Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the CSS tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the style.css file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Divi Theme Options Integration
Otherwise, paste this code in your Divi>Theme Options>Custom CSS code box.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom code In Divi.

.pa-blurb-icon .et_pb_image_wrap { 
color: #ffffff;
  background: #000000;
  padding: 20px;
  border-radius: 10px;
  font-size: 48px;
}

Be sure to watch the video to see this all in action and to see how simple this solution is! We use it on our sites and couldn’t be happier. Let me know in the comments if you enjoyed this!

Last updated [last-modified %date%]

Subscribe

Each month we send out a roundup email newsletter with the latest tutorials, product updates, helpful resources, and any other industry or personal news. Occasionally we send an extra separate email here and there if we just can’t wait! So that’s what you will get if you subscribe, and you can always unsubscribe at any time if you just can’t take it anymore :)

Blog Post Optin

Please share this post!

Nelson Lee Miller (aka The Divi Teacher)

Nelson is the owner of Pee-Aye Creative in the beautiful state of Pennsylvania. He loves helping small businesses, exploring outdoors, building websites with Divi, and teaching others.

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

15 Comments

  1. Nora

    Thanks! I’ve been looking for this! What can you do if you want to style the icon on hover?

    Reply
    • Nelson Lee Miller (aka The Divi Teacher)

      Hi Nora,
      I’m so glad you like it! I’m not sure what you want example, but you can always add :hover to your button class and add the styling that you desire.

      Reply
    • Hemant Gaba

      Hi Timothy,

      Thank you for the suggestion and we will definitely look into it. 🙂

      Reply
  2. Muhammad Taimoor

    Thanks!

    Reply
  3. Stacey Harris

    Nifty way to substitute icons. I just added the jquery to a code box below each blurb I was using (I did change the class name, just to avoid “code confusion”.) I would note that if the script is added to individual code boxes, users won’t see the change until they exit the visual builder. Thanks for your great tips!!

    Reply
  4. Lee Roberts

    Nelson, thanks for your great videos… and please help.

    I can’t get this to work and I know it must be something I’m doing or not doing… the page is live to view if you want to look at it… stage dot 4z1 dot co dot uk.

    Thanks

    Reply
    • BirdieH

      apologies… had a blonde moment!! all good 😊

      Reply
    • Hemant Gaba

      Hi Lee,

      Could you please tell me what is the issue that you are facing while following the steps mentioned in the guide?

      Reply
      • Ross

        Hi. Is it possible to add the head code to a single page instead of global in theme options?

      • Hemant Gaba

        Hi Ross,

        Yes, it is possible. Please try adding a code module on a page where you want the code to be implemented and then add the code in the module.

        Let me know how it goes. 🙂

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

0

Your Cart