Alter the Color of the Toggle Button on the Popup

The GDPR Cookie Consent Plugin gives the users granular control over the cookies that they want to allow. This is made possible with a popup that appears when clicked on the Settings button. From this popup, the users can enable or disable the cookies based on their categories using a toggle button.

The toggle buttons by default have teal color. The following code snippet allows you to add the color of the toggle button on the Settings popup from the default color. Simply add the following code snippet to the style.css file of the active theme and replace the hex code of the property background-color with the hex code of the custom color.

 

  • Was this article helpful ?
  • YesNo

5 thoughts on “Alter the Color of the Toggle Button on the Popup

  1. Jadiel says:

    Hi,
    What about changing the text of this shortcode [user_consent_state] to “Update Privacy & Cookies Policy” to add on my footer?

    Thanks.

    • Mark
      Mark says:

      Hi Jadiel,

      Please add below code snippet to your active theme’s function.php
      function wt_cli_cookie_manage_custom( $atts )
      {
      $atts = shortcode_atts( array(
      'title' => 'Manage consent',
      'style' => ''
      ), $atts );
      return "" . __( esc_html( $atts['title'], 'cookie-law-info') ) . "";
      }
      add_shortcode( 'wt_cli_manage_consent', 'wt_cli_cookie_manage_custom' );

      Then you can use below short code.
      [wt_cli_manage_consent title=”Manage your consent”]

Leave a Reply

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