Title: Prechecked Checkboxes
Last modified: June 17, 2025

---

# Prechecked Checkboxes

 *  Resolved [mohobook](https://wordpress.org/support/users/mohobook/)
 * (@mohobook)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/prechecked-checkboxes/)
 * Hello, when the banner loads, the Functional Cookies and Market Cookies checkboxes
   are not checked, is there a way to have these prechecked?
 * Also, the Reject Cookies button is preventing essential cookies from being set,
   can this be changed?
 * Also, is this plugin still being maintained? It says it’s only compatible up 
   to 6.7.2, I hope so, it’s the best option I’ve found
    -  This topic was modified 11 months, 2 weeks ago by [mohobook](https://wordpress.org/support/users/mohobook/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [christophrado](https://wordpress.org/support/users/christophrado/)
 * (@christophrado)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18517282)
 * There is currently no way to set the checkboxes as prechecked. I feel like this
   is against privacy laws and privacy best practices, so right now I don’t think
   I will add a dedicated option for this. You could of course use custom code and
   the filters provided by CNC to change the output according to your likes.
 * The reject button should not prevent the essential category from being output.
   Do you have a live site where I can check the behaviour?
 * The plugin is actively being maintained, I just hadn’t had the chance to push
   a “tested up to” update yet. Everything should be fine with 6.8 though.
 *  Thread Starter [mohobook](https://wordpress.org/support/users/mohobook/)
 * (@mohobook)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18518082)
 * Sorry, I didn’t properly explain the problem with essential cookies, on the Essential
   Cookies tab on the plugin admin page, there is a field for code (same as the 
   other two cookie types), but when you add code to this field, it is not output
   if the user selects Reject Cookies, despite the message on the page, here’s a
   screenshot to better explain
 * [https://snipboard.io/XgUtAE.jpg](https://snipboard.io/XgUtAE.jpg)
 * One other thing please, I am having a problem styling the checkboxes, the CSS
   has no effect regardless of what importance I give it, can you please point me
   in the right direction?
 * The problem is, the unchecked checkboxes look like they are in the disabled state,
   here’s a screenshot
 * [https://snipboard.io/sOCJwR.jpg](https://snipboard.io/sOCJwR.jpg)
 *  Plugin Author [christophrado](https://wordpress.org/support/users/christophrado/)
 * (@christophrado)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18518346)
 * I just ran some tests myself and the essential category does indeed not run correctly
   when cookies are rejected. That should not be the case. I’ll try to push out 
   a release soon to address this.
 * As for styling and overwrites, you can check the CSS for the default themes in`/
   wp-content/plugins/cookie-notice-consent/css/`. The themes use selectors such
   as this: `#cookie-notice-consent .cookie-notice-consent__container`. You could
   overwrite them by adding the element name like this: `#cookie-notice-consent 
   div.cookie-notice-consent__container`. That would make your rules more specific
   and therefore overwrite the theme’s styling. Please consult the theme’s CSS to
   review any default rules. Also, it might be easier to set the Default/None theme
   and copy and edit one of the other themes CSS instead of overwriting them. But
   that’s up to you.
 * For the checkbox color, try setting a different accent color in the settings.
   The included themes are somewhat expecting an actual color as an accent. A mid-
   tone grey is ending up looking like the unchecked state indeed.
 *  Thread Starter [mohobook](https://wordpress.org/support/users/mohobook/)
 * (@mohobook)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18518575)
 * Thanks for the info, not sure I completely understand though 😉
 * Even when I try to override the colour in the inspector, there is no effect, 
   see below
 * [https://snipboard.io/zETrIW.jpg](https://snipboard.io/zETrIW.jpg)
 *  Plugin Author [christophrado](https://wordpress.org/support/users/christophrado/)
 * (@christophrado)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18518581)
 * The input itself isn’t used in the default themes. It has the `opacity: 0` definition
   that’s right below your custom one in the provided screenshot. It’s not visible,
   hence styles on that element have no effect.
 * Instead, the corresponding `label` element and its `::before` and `::after` pseudo
   elements are being used to build the checkbox style.
 * Please review the default theme CSS file to learn more about the theme’s styling.
 *  Thread Starter [mohobook](https://wordpress.org/support/users/mohobook/)
 * (@mohobook)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18520350)
 * Thank you for trying to help but styling the way you are suggesting is just too
   difficult (for me)
 * Instead, I have changed the design to Labs but I’m running into a problem there
   as well, the Reject Cookies button is no longer visible
 * This happens on each site I try, see below
 * [https://snipboard.io/YeoIqt.jpg](https://snipboard.io/YeoIqt.jpg)
 *  Plugin Author [christophrado](https://wordpress.org/support/users/christophrado/)
 * (@christophrado)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18520867)
 * The Labs theme styles the Reject button as the “close” button visible in the 
   top right of the modal.
 * If you’d like to change this, again, you would need to apply custom CSS. Please
   consult your web developer for help.
 * CNC is, as the description notes, tailored towards developers and code-savvy 
   users and meant as a base framework to build upon. Custom styling is beyond the
   scope of my support I’m afraid.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Prechecked Checkboxes’ is closed to new replies.

 * ![](https://ps.w.org/cookie-notice-consent/assets/icon-256x256.png?rev=2471736)
 * [Cookie Notice & Consent](https://wordpress.org/plugins/cookie-notice-consent/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice-consent/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice-consent/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice-consent/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice-consent/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice-consent/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [christophrado](https://wordpress.org/support/users/christophrado/)
 * Last activity: [11 months, 1 week ago](https://wordpress.org/support/topic/prechecked-checkboxes/#post-18520867)
 * Status: resolved