Banner is not showing
Work through the causes below in order. First check that LandexHub Consent is on the page at all: open the page source (not the element inspector) and search for landexhub-consent-bootstrap and landexhub-consent-js. Both are printed in <head>.
You already made a choice
The banner appears only while the browser holds no valid choice. Once you accept or reject, it does not come back; only the cookie icon shows (on by default), or the footer link if you turned the icon off.
- The choice is stored in the cookie
landexhub_consent. After Reset consents the name gets the revision number (landexhub_consent_2,landexhub_consent_3…). On a multisite subsite it also carries the site ID (landexhub_consent_s2). - A consent is valid for 12 months and a rejection for 6 months by default (Advanced → General, see Settings).
- A damaged cookie counts as no choice, so the banner shows again.
How to check: open the site in a private window, or delete the cookie in the browser's developer tools (Application → Cookies). Advanced → Tools → Reset consents asks every visitor again, not just you, so use it only when you mean to.
The admin preview and the live site
The Live preview on the Appearance screen changes as you type. The site changes only after you save, and only once visitors get a fresh copy of the page.
The bar settings are part of the page HTML. A page served from a cache (a caching plugin, the host's server cache, a CDN) keeps the settings it was saved with. LandexHub Consent does not clear these caches. After you save:
- clear the cache of your caching plugin,
- clear the server cache in your hosting panel, if your host has one,
- purge the CDN (for example Cloudflare), if you use one.
After Reset consents, clear the cache too. A cached page still carries the old cookie name, so visitors who chose before the reset are not asked again until the cached copy is replaced.
Script optimisation
LandexHub Consent loads in <head>: first a small inline script with the Consent Mode default (id="landexhub-consent-bootstrap"), then the main script landexhub-consent.js with defer. The main script draws the banner. If it is combined, delayed or moved, the banner can appear late or not at all.
What the plugin excludes by itself. The main script carries the attributes data-no-optimize, data-no-minify, data-no-defer, data-cfasync="false" and data-wpmeteor-nooptimize, which tell optimisation tools (such as Cloudflare Rocket Loader) to leave it alone. When one of these plugins is active, LandexHub Consent also adds itself to its official exclusion lists:
| Plugin | Excluded from |
|---|---|
| WP Rocket | JS minify/combine, delay JS, inline JS combining, inline defer |
| LiteSpeed Cache | JS optimisation, JS defer |
| Autoptimize | JS optimisation |
| SiteGround Optimizer | JS minify, JS combine |
| Perfmatters | Delay JS |
Other optimisation plugins, or manual rules that override the lists above, need the same exclusions added by hand:
- script files under
/wp-content/plugins/landexhub-consent/assets/js/, - the inline scripts containing
landexhub-consent-bootstrapandLandexHubConsentConfig.
Leave them out of combining, minifying, deferring and "delay JavaScript until user interaction". With delayed JavaScript the banner would wait for the visitor's first click or scroll.
The Diagnostics tab checks, on your homepage HTML, that the Consent Mode default comes before the Google tags.
Debug mode
On a staging site, add this to wp-config.php:
define( 'LANDEXHUB_CONSENT_DEBUG', true );LandexHub Consent then prints what it decided for the current request as an HTML comment at the end of the page. Open the page source and search for LANDEXHUB CONSENT DEBUG:
=== LANDEXHUB CONSENT DEBUG ===
LandexHub Consent 0.9.6
Consent Mode: v2 advanced (default denied)
Consent validity: 12 months / rejection: 6 months
Consent revision: 2
Consent default emitted: yes
Cookie name: landexhub_consent_2
Categories enabled: necessary, analytics, marketing, preferences
Gated handles: none
Optimization plugins: none detected
Caching: WP_CACHE off
=== /LANDEXHUB CONSENT DEBUG ===(shortened)
What to look for:
- Cookie name. Compare it with the cookie in your browser. If your browser holds this exact cookie, the banner stays hidden because you already chose.
- Optimization plugins and Caching. Active caching or optimisation plugins that LandexHub Consent recognises, and whether
WP_CACHEis on. Check their settings against Script optimisation. - No debug comment at all, although the constant is set: the page probably comes from a cache (clear it, see above), or the theme does not call
wp_footer()(see below).
Turn debug mode off when you are done. Anyone who views the page source can read the block. More in Developers.
For support, copy the Diagnostic report from Advanced → Tools.
A theme without wp_footer()
The banner itself does not depend on the footer: its scripts load in <head>. A theme that never calls wp_footer() loses the Cookie settings link in the footer (used when the cookie icon is off) and the debug comment. Visitors then have no way to change their choice. Keep Cookie icon after consent on (Appearance, the default), or place the [landexhub_consent_settings] shortcode in the theme.