WordPress developer in Dublin

Cookie consent on WordPress under S.I. 336/2011 regulation 5 and the Data Protection Commission guidance: what the law requires, what a stock site sets, and how I wire consent so scripts wait.

WordPress developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.

My WordPress.org profile

Irish cookie law comes down to one regulation and one regulator’s guidance, and a WordPress site tends to break it in the same few places. Regulation 5 of S.I. 336/2011 forbids storing information on a visitor’s device, or reading it, without consent. The Data Protection Commission, which sits at 6 Pembroke Row in Dublin 2, published its guidance note on cookies and other tracking technologies in April 2020. This page turns both into a WordPress build: what a stock site sets, what the banner must do, and how I make scripts wait until the visitor has chosen.

For the wider service see WordPress developer. Shops are covered on WooCommerce developer in Dublin.

#What regulation 5 says

The text of S.I. 336/2011 is short. Regulation 5(3) says a person shall not use an electronic communications network to store information, or gain access to information already stored in a visitor’s terminal equipment, unless two conditions are met. The visitor has given consent, and the visitor has been given clear and comprehensive information that is prominently displayed, easily accessible and states the purposes. Regulation 5(4) adds that the ways of informing and obtaining consent should be as user-friendly as possible.

Regulation 5(5) holds the only exemptions: storage or access for the sole purpose of transmitting a communication, and storage or access that is strictly necessary to provide a service the visitor explicitly requested. Everything else needs consent first.

The Commission’s guidance fills in what that means for a website owner:

  • Consent must meet the GDPR standard in Article 4(11): freely given, specific, informed and unambiguous, by a statement or a clear affirmative action.
  • The law covers every technology that stores or reads information on the device: cookies, local storage, pixels, software development kits and device fingerprinting.
  • It makes no difference whether the cookie holds personal data. Where it does, the GDPR applies as well.
  • The Commission gave controllers six months from publication to comply, after which enforcement would begin. That period is long over.

#What a stock WordPress site sets

Core WordPress ships suggested privacy text that lists its own cookies, which makes it the most reliable inventory for a bare install. Per the core source, core sets these:

CookieWhenLifetime stated by core
Comment details (name, email, website)Only if the commenter ticks the opt-in boxOne year
Login test cookieWhen the login page is visitedDiscarded when the browser closes
Login cookiesAfter loginTwo days, or two weeks with Remember me
Screen optionsAfter loginOne year
Edited post IDAfter editing or publishingOne day

The same text says WordPress does not collect analytics by default and does not share personal data by default. Embedded content from other sites is a separate matter: the suggested text warns that such embeds may collect data, use cookies and track interaction.

Most of the risk sits above that baseline. A theme adds a font service, a plugin adds a tag manager, a form plugin adds a captcha, and a marketing team pastes in a pixel. None of those appear in core’s list.

The Commission’s examples give a working test for each item on your inventory.

ItemConsent needed?Basis in the guidance
Session cookie that keeps a shopping basketNoStrictly necessary, the Commission’s own example
Language or country preferenceNoStrictly necessary, same example
Load balancing cookie that identifies a serverNoCommunication exemption
Cookie with a two-year lifespan that remembers journey preferencesYesThe Commission’s travel site example
Chat widget cookiesYes, until the visitor asks to use chatThe Commission’s chatbot example
AnalyticsYesStated directly
Advertising and marketingYesNot strictly necessary
Social buttons, embedded widgets, pixel trackersYesController may be a joint controller with the third party (Fashion ID judgment)

Lifespan counts too. A cookie that outlasts the purpose it serves is disproportionate, and the guidance gives a session cookie with an indefinite expiry as the example.

#Where WordPress sites go wrong

These are the failures I look for first, each one named in the guidance:

  1. A banner with a single Accept or “I understand” button and no reject or manage option.
  2. Reject or manage sitting a layer deeper than Accept, instead of equal prominence.
  3. Pre-ticked boxes or sliders set to on.
  4. Consent inferred from scrolling, clicking or continued use.
  5. A banner that disappears on scroll without any interaction.
  6. One consent bundled across purposes, or bundled with the terms of a service.
  7. A banner that covers the cookie policy or privacy policy text, so the visitor cannot read it without cookies being set.
  8. A stored consent record kept longer than six months without a justification.
  9. Colour-only on and off switches that blend into the background, which the Commission flags as an accessibility problem.

None of this is solved by choosing a different banner plugin. It is solved by checking what the page actually does before and after the click.

#How I build it

Inventory first. I load the site in a clean browser profile, decline everything and list every cookie, local storage key and request to a third-party host. Then I accept and compare. The difference between the two lists is the work.

Block at the source. A banner script can hide third-party iframes and block known script URLs. It cannot stop a WordPress plugin that sets a cookie in PHP. The WP Consent API exists for that gap: it standardises how plugins read the visitor’s consent category, so a supporting plugin asks before it sets anything. The plugin handles no consent itself and needs a cookie banner plugin plus at least one plugin that supports the API.

One trap is documented in its readme. If no consent management plugin sets a consent type, every category returns true, and cookies are allowed. A site with the API installed and no working banner is therefore not protected by it.

Load tags after the choice. On a page-cached site the server cannot know a visitor’s choice, so the check runs in the browser. The API’s own pattern, shortened:

function startAnalytics() { /* inject the analytics script tag here */ }

if ( wp_has_consent( 'statistics' ) ) { startAnalytics(); }

document.addEventListener( 'wp_listen_for_consent_change', function ( e ) {
	if ( e.detail.statistics === 'allow' ) { startAnalytics(); }
} );

The categories in the plugin’s configuration are functional, preferences, statistics, statistics-anonymous and marketing.

Embeds get a placeholder. A video or map loads only after the visitor accepts the matching category, with a plain link to open it on the provider’s site for those who decline.

Record and re-ask. The consent state is stored with a lifetime no longer than six months, a visible control lets the visitor change or withdraw it as easily as it was given, and the cookie policy lists what each category contains. If a third-party consent tool keeps the record, it also belongs in your record of processing under GDPR Article 30, as the guidance says.

#What happens if it is wrong

The Commission is the national authority for the ePrivacy rules. Under regulation 17 it can investigate a complaint or act on its own initiative, and regulation 5 is one of the prescribed provisions it can enforce. It can serve an enforcement notice requiring specific steps within a set period, which the recipient can appeal to the Circuit Court within 21 days. Failing without reasonable excuse to comply with a notice is an offence, and regulation 27 sets a class A fine on summary conviction for offences under the regulations.

That is the ePrivacy side. Where cookie data is personal data, the GDPR runs alongside it, including transparency duties under Articles 12 to 14.

River Liffey and Samuel Beckett Bridge in Dublin

Photo: Christian David, CC BY-SA 4.0, Wikimedia Commons.

#A checklist you can use without me

  • Is there a reject option with the same prominence as accept?
  • Do any cookies, local storage entries or third-party requests appear before the visitor has chosen?
  • Does every plugin on the site appear in your cookie policy, with a purpose and a lifetime?
  • Are embeds and tag manager containers blocked until consent?
  • Does the stored consent expire within six months?
  • Can a visitor withdraw consent from every page, in the same number of clicks it took to give it?
  • Does the cookie policy stay readable while the banner is open?

#What I need to start

  • The site address, and a staging copy if one exists.
  • Access to the WordPress admin, and to the tag manager if there is one.
  • A list of the analytics, advertising and embed tools the business uses.
  • Whether the site sits behind a page cache or a CDN.

The build is done by one person, remotely and in writing. I design the layout and visual design, or I build from your own design if you have one.

Yes. The Data Protection Commission says analytics cookies need consent. It adds that first-party analytics limited to aggregated statistics are unlikely to be an enforcement priority, but that is a statement about priorities, not an exemption.

#Is a banner with one Accept button enough?

No. The Commission lists banners with buttons such as “ok, got it” and no way to reject or read more as not compliant. Reject, or a route to manage choices, needs equal prominence with accept.

The Commission treats six months as the appropriate outer limit and says a longer period has to be justified case by case. After that the visitor is asked again.

A session cookie that only keeps the basket for a service the visitor asked for meets the strictly necessary test, and the Commission uses that exact example. Cookies for advertising do not.

#What about an embedded YouTube video or Google Map?

An embed that loads third-party code on page load can store or read information on the device, so it waits for consent. WordPress core notes in its suggested privacy text that embedded content from other sites may track visitors.

Yes. Regulation 5 applies to any information stored on or read from the device, and the Commission cites the Planet49 judgment of 1 October 2019 for that point.

#What happens if the Commission finds a breach?

It can serve an enforcement notice under regulation 17. Failing to comply with the notice is an offence, and regulation 27 sets a class A fine on summary conviction. Personal data from cookies is also covered by the GDPR.

#Send me the site in writing

Email the site address, the plugins and tracking tools you use, and your hosting setup. I will set out in writing what a consent fix covers on your site, and the first written estimate is free. I reply within 24 hours on working days (CET). Use the contact page.

Need this service: WordPress developer in Dublin?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Latest WordPress developer articles

Sep 14, 2017

WordPress 4.9 to Gutenberg: how WordPress changed

WordPress 4.9 was "the calm before the storm." We analyze this pivotal moment in WP history that prepared the ground for the block editor. What changed since? How did the ecosystem evolve?

Oct 26, 2014

Best free WordPress plugins in 2026

Compare the best WordPress plugins in 2026 for security, SEO, cache, backups, and image optimisation, with practical advice on what to install and what to avoid.

Explore other WordPress services and knowledge base