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 this piece of code helps you with your DIVI customization.
I would love to hear about how I can help you with your business website. I have a Masters in Computer Science from Pace University, New York. Having worked in the software industry for many years, I am now freelancing and have specialized in using the DIVI theme from Elegant Themes, since the past eight years. Do have a look at my portfolio to view my other completed projects. Feel free to contact me and I will get back to you immediately.
0 Comments