Astuce Divi n°55

How can I colour match my WooCommerce shop with Divi?

Published on 13/05/2019 | 11 comments

618 words

2

You've just added an online shop to your Divi site and you realize that the WooCommerce buttons are a terrible blue? Don't worry, in this article, I'll quickly explain how to get your shop to match your graphic design...

Here is the programme:

  1. Changing the theme accent colour
  2. Change the colour of the hover buttons
  3. Change the colour of the WooCommerce promo badge
  4. Use a different colour from the theme's accent colour
Changer les boutons de couleur WooCommerce et Divi

Announcement: this article contains affiliate links that you will easily recognise. The classic links are in purple and sponsored links are in pink.

1 - Change the theme accent colour

Couleur de base - WorCommerce et Divi

As you can see in the screenshot above, this is what a product listing looks like in an online shop created with WooCommerce and Divi. If you don't change anything, your product will look like this:

  1. The WooCommerce notification will have a blue background
  2. The button View basket will be written in blue
  3. The promotional badge will be orange
  4. The product price will be blue
  5. The button Add to basket will also be blue.

And that blue, I guess we all hate it!!!

Here is how to change the colour of most WooCommerce buttons/notifiers in one click:

Couleur d'accent du thème Divi
  1. Go to the tab Appearance > Customise > General settings > Layout settings. Set the accent colour of your theme. This means that many elements of your site will have the same colour. This helps to keep the design of your site consistent and will also work for your shop.
  2. This way, the WooCommerce notification will take on the accent colour of your theme.
  3. The price of the product too.
  4. However, the add to cart button will remain blue for the time being, on mouse-over.
  5. And the promo badge will also remain orange.

2 - Change the colour of the hover buttons

Bouton au survol - Divi et WooCommerce

To change the colour of the button Add to basketbutton, when the mouse hovers over it:

  1. Go to the tab Appearance > Customise > Buttons > Hover Button Style. Set the colour of the mouse-over text.
  2. Now the hover text gets the desired colour.
  3. The promo badge is always orange. We will see how to change it next.
plus de ressources pour Divi

3 - Change the colour of the WooCommerce promo badge

There is no option to change the background colour of the promo badge. You will have to do it in CSS :

Changer la couleur du badge promo Divi et WooCommerce
  1. Go to the tab Appearance > Customise > Additional CSS.
  2. Enter the code below.
  3. The colour of the promo badge is customised!
/* changer la couleur du badge promo woocommerce */

 .woocommerce span.onsale, .woocommerce-page span.onsale {
     background: #974df3 !important;
 }

Of course, you will change the colour code to use your own.

4 - Use a different colour from the theme's accent colour

What if you want to use a different colour for your WooCommerce shop than the Divi theme accent colour?

couleur différence de la couleur d'accent du thème

This is quite possible. In this case you will have to customize your WooCommerce shop entirely with CSS.

The following code should be pasted into the tab Appearance > Customise > Additional CSS.

/* customiser WooCommerce avec Divi */

 .woocommerce a.button, .woocommerce a.button.alt, .woocommerce a.button.alt:hover, .woocommerce a.button:hover, .woocommerce-page a.button, .woocommerce-page a.button.alt, .woocommerce-page a.button.alt:hover, .woocommerce-page a.button:hover, .woocommerce button.button, .woocommerce button.button.alt, .woocommerce-page button.button, .woocommerce-page button.button.alt, .woocommerce button.button:hover, .woocommerce button.button.alt:hover, .woocommerce-page button.button:hover, .woocommerce-page button.button.alt:hover {
     color: #974df3 !important;
 }

 .woocommerce .woocommerce-error, .woocommerce .woocommerce-info, .woocommerce .woocommerce-message {
   color: #974df3 !important;
     background: #974df3 !important;
 }

 .woocommerce .woocommerce-message {
     color: #ffffff!important;
 }

 .entry-summary p.price ins {
     color: #974df3 !important;
 }

 .woocommerce span.onsale, .woocommerce-page span.onsale {
     background: #974df3 !important;
 }

Here, too, you should consider changing the colour code to your own.

Need more resources on Divi? Visit the ElegantThemes blog which is full of ideas and tutorials!

You will also like :

Changer la couleur des boutons WooCommerce
Harmoniser la couleur de la boutique avec la charte graphique
obtenir divi bouton
quizz divi bouton
newsletter bouton
formation divi bouton
guide divi pdf bouton
bouton support divi

You might like it too:

Comment changer une image au survol de la souris ?

How to change an image on mouseover?

If you are not using the hover options available in Divi, you are missing out! Here's an example of how to use them that you might find useful. In this tutorial and video, I show you how to change an image on mouseover.

11 Commentaires

  1. audrey PUYBONNIEUX

    Bonjour, j’ai regardé pour faire mon changement de couleur d’accent du thème mais je pense avoir la dernière version de DIVI. donc j’ai rien pour le changer dans la manière que vous l’expliquer comment faire dans ce cas et dans quelle ligne mon css faut faire les changement;
    merci à voua d si vous pouvez m’aider.
    Audrey

  2. Lycia Diaz

    Salut Audrey, tu dois inspecter le code CSS dans ton navigateur pour trouver quelle est la ligne à changer.

  3. Broggini

    Bonjour,

    je ne sais pas si je suis dans la bonne section.

    Je post ici mon problème:

    J’utilise le layout ‘Nutritionnist’ pour mon site que je personnalise. Il n’y a pas de page SHOP dans ce layout.
    Donc j’utilise un autre layout qui possède une page SHOP.

    Seulement cette page SHOP ne se met pas en fullWidth comme convenu.

    J’ai essayé plusieurs possibilités, ajout de code CSS, parametrages dans les options de theme, mais rien n’y fait.

    Auriez-vous une solution?

    Merci à vous 🙂

    Damien

  4. Lycia Diaz

    Salut Damien,
    Tu dois vérifier le dimensionnement, soit des sections, soit des rangées. Tu dois mettre à 100% au lieu de 80% et mettre la largeur à 2500px au lieu de 1080px. Ça se passe dans les réglages des sections ou des rangées à l’onglet Styles > Dimensionnement ou Styles > Espacement.

  5. sanchez

    Bonjour Lycia,
    je recherche une manière de changer la forme des boutons, auriez-vous une solution?

  6. Lycia Diaz

    Ça ne fonctionne pas si tu personnalises tes boutons depuis l’onglet Apparence > Personnaliser > Boutons ?

  7. jérôme

    bonjour,
    est-il possible de choisir un dégradé de couleur au survol des boutons?
    dans apparences, seulement les couleurs uniformes sont possible.

    merci, et au passage, votre site est une ressource inestimable pour moi 😉

  8. Lycia Diaz

    Salut Jerome, en natif on ne peut pas mais avec du CSS c’est sûrement possible

  9. Heath Jansse

    This was so helpful, thank you so much for your work on this article!!! Kindly from Australia.

  10. Lycia Diaz

    Thanks !

  11. yohan

    bonjour, je souhaite modifier la page « mon compte » woocommerce j’utilise deja divi depuis plusieurs années j’ai vu les ajouts des modules woo dans divi egalement toutefois je ne vois pas comment on peut faire pour changer la couleurs le style…
    merci de votre aide

Soumettre un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.