Hey @_lacus, I was after a similar thing – I wanted to override some of the styles, without having to do a shed load of !importants.
This answer, over at StackOverflow, whilst not explicitly about this plugin, is answering a similar question. I’ve adjusted it to suit. Give the following a go, it worked for me. Hopefully it’s the right way to go about it.
First, copy the main.css file from the plugin directory (gdpr-cookie-compliance/dist/styles/main.css) to your theme’s folder, mimicking the plugin’s directory layout. Make all your adjustments in this copied file that now resides in your theme directory. For example, changing the font from Nunito to your theme’s font.
Drop this in your theme’s functions.php (this is from the StackOverflow answer, altered for this GDPR plugin:
function gdpr_override() {
wp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/styles/main.css' );
}
add_action( 'wp_enqueue_scripts', 'gdpr_override', 999 );
?>
Hope that helps.
-
This reply was modified 7 years, 10 months ago by
unexploded.
Thread Starter
_lacus
(@_lacus)
@unexploded thank you for your reply!
I used deregister style, and i added the plugin css to my theme css (less files to load):
function my_deregister_styles() {
wp_deregister_style( 'moove_gdpr_frontend' );
}
add_action( 'wp_print_styles', 'my_deregister_styles', 99 );
Hi there,
Thanks for your comments on this. Please update the plugin to the latest version and you can change the font in the “General settings” tab. If you override the font, the Nunito font will not be loaded, you have to ensure the selected font is included by your theme.
Another improvement, the !important tags are removed from the stylesheet.
I hope this helps.
Thread Starter
_lacus
(@_lacus)
Thank you, for the great support!