Support Forum Support Forum GDPR Cookie Compliance Change font color for the cookie banner

Topic Resolution: Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Avatarsrajwade
    March 10, 2020 @ 1:35 pm

    Hello,

    I added a function in functions.php to change the font color and font weight, but it does not get updated. Is there any specific file that I need to make this change in?

    Following is my function to update font-color/font-weight:

    add_action('wp_footer', 'cookie_banner_style');
    function cookie_banner_style() {
        echo '<style>
        .moove-gdpr-info-bar-content p {
          color: #727579;
          font-weight: lighter;
        }
      </style>';
    }

    Thank you

    Moove AgencyMoove Agency
    March 10, 2020 @ 1:50 pm

    Hi srajwade,

    Thanks for using our plugins.

    You can use the following code snippet to customise the cookie banner style:

    add_action('moove_gdpr_inline_styles','gdpr_cookie_css_extension',10,3);
    function gdpr_cookie_css_extension( $styles, $primary, $secondary ) {
    	ob_start();
    	?>
    
    	#moove_gdpr_cookie_info_bar.moove-gdpr-dark-scheme .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p, 
    	#moove_gdpr_cookie_info_bar.moove-gdpr-dark-scheme .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p a,
    	#moove_gdpr_cookie_info_bar.moove-gdpr-light-scheme .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p, 
    	#moove_gdpr_cookie_info_bar.moove-gdpr-light-scheme .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p a {
    		color: #727579;
    		font-weight: lighter;
    	}
    
    	#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content a.mgbutton, 
    	#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content button.mgbutton {
    		font-weight: lighter;
    	}
      <?php
      $styles .= ob_get_clean();
      return $styles;
    }

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.