Extra Text Before Shopping Cart Icon

How easy is it to add some extra piece of text before the shopping cart icon on your woocommerce DIVI site?. Just a few lines of jQuery will help you achieve the same. For example you might want to add the words “Shopping Cart” or “All Cart Items” before the cart icon. Adding this will make it quite obvious for the user, where the shopping cart is.

Where can we add a few lines of jQuery to the Divi theme. To add jQuery to the Divi theme you can scroll to – Divi -> Theme Options – Integration Tab -> Add code to the < head > of your blog.

Paste the following jQuery and Save Changes. Change the words “Shopping Cart” to anything you want it to be.  Adjust the margins or add some of your own styles (color, font etc) in the style attribute to match your website branding.

<script type=”text/javascript”>
jQuery(function($){
$(‘#et-secondary-menu’).prepend(‘<span style=”margin:0 7px”>Shopping Cart</span>’);
});
</script>

I hope you like this piece of code and hope it works for your Divi customization.

0 Comments

Submit a Comment

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

I would love to hear about how I can help your business website. I have specialized in using the DIVI theme from Elegant Themes since the past four years. If you would like to see the projects that I have completed as a DIVI freelancer, please do have a look at my portfolio. Please contact me and I will get back to you immediately.