Docs menu
WordPress
The CookieHug WordPress plugin: installation, connecting your account, the WordPress Consent API, the core/plugin version audit and FAQ.
WordPress Plugin
The official CookieHug WordPress plugin is a thin connector: it pairs your site with a CookieHug account, injects the consent banner script into the page <head>, and links back to the dashboard. All banner configuration (texts, categories, Consent Mode) lives in the CookieHug dashboard.
Installation
Download the latest plugin ZIP from the Integrations page in your CookieHug dashboard, then:
- In wp-admin go to Plugins → Add New → Upload Plugin, choose the ZIP and click Install Now.
- Click Activate.
- (Recommended) Install and activate the WP Consent API plugin from WordPress.org so CookieHug's choices are shared with other plugins on your site.
Connecting to CookieHug
- In the wp-admin menu click CookieHug, then Connect with CookieHug.
- You are redirected to cookiehug.com — sign in if needed, pick the domain to pair, and confirm.
- You are bounced back to WordPress with the connection saved. The banner starts appearing on the frontend automatically.
WP Consent API
CookieHug integrates with the WP Consent API (wordpress.org/plugins/wp-consent-api). When that plugin is active, every choice a visitor makes in the CookieHug banner is mirrored into the shared consent bus, so any other plugin can read consent via wp_has_consent(). CookieHug registers as the consent management plugin and sets the consent type to opt-in — non-essential categories are denied until the visitor consents.
Category mapping:
| CookieHug | WP Consent API |
|---|---|
| necessary | functional (always allowed) |
| preferences | preferences |
| statistics | statistics, statistics-anonymous |
| marketing | marketing |
Cookie declaration shortcode
Put the [cookiehug_declaration] shortcode on any page or post (Shortcode block, Classic editor, or a page builder). The plugin renders the categorised cookie table in place and loads the declaration script only on pages that use the shortcode. Alternatively, a Custom HTML block with the snippet from the dashboard works too.
WordPress software audit
For domains detected as WordPress, CookieHug runs a nightly audit of software freshness: the versions of WordPress core and of plugins visible in the page source are compared against the official releases on wordpress.org. Outdated plugins and themes are the most common attack vector on WordPress sites, so the result is shown as a dedicated card — Domain → Advanced → Diagnostics → WordPress — software freshness — listing the detected core version and each recognised plugin with its installed vs latest version.
The audit is passive: it reads what the page already exposes, needs no plugin and never logs into your site. It refreshes automatically every night; components whose version cannot be read from the outside are listed as undetermined rather than guessed. The public scanner shows only the number of outdated components — the full list requires an account.
FAQ
Where do I change banner text, colours or categories? In the CookieHug dashboard — click Open CookieHug dashboard on the plugin settings page. The plugin intentionally does not expose those controls locally.
What happens on deactivate or uninstall? Deactivation stops the script from loading. Deleting the plugin removes all cookiehug_* options. The server-side connection is not revoked automatically — disconnect first from the settings page or the CookieHug dashboard.