Appearance
Troubleshooting
Common issues and how to resolve them.
The site is stuck loading after theme activation
Elementor Pro Theme Builder is hijacking rendering.
/wp-admin/plugins.phpin a new tab.- Deactivate Elementor Pro temporarily.
- Refresh the front-end.
- Upload + activate the migrator plugin — trashes the leftover templates.
- Reactivate Elementor Pro — won't hijack anymore.
The header nav is off-center
Theme.css uses CSS Grid 1fr auto 1fr for perfect centering. If the nav is off-center on live:
- Autoptimize is serving a stale cache. Admin bar → Autoptimize → Delete Cache.
- Force a version bump — the theme's
?ver=query on CSS URLs is derived fromDANKCAVE_VERSION. Bump it infunctions.php+style.cssand re-upload.
The footer newsletter form is stacking vertically instead of side-by-side
The theme's CSS targets both MC4WP template variants. If it's stacking:
- Clear Autoptimize cache.
- Verify the form HTML is either
<div class="dc-mc4wp">or standard<p>-wrapped fields. Custom form templates the theme doesn't know about won't be styled.
robots.txt still has "Crawl-delay: 30"
There's a physical robots.txt file on the server. WP's robots_txt filter never fires when a physical file exists (Apache/nginx serve it directly).
Fix: Yoast SEO → Tools → File editor → robots.txt → delete the Crawl-delay: 30 line → Save.
The og:image is the small cropped logo, not the branded card
Yoast Premium's modern presenter pipeline doesn't respect the classic wpseo_opengraph_image filter. The theme has a 3-layered fix — verify:
- Theme version is v0.1.6+.
- Autoptimize cache cleared.
- View source →
<meta property="og:image">— should beassets/img/og-share.png.
If still showing the tiny logo, Yoast may have a page-level social image override. Check Yoast SEO panel on the page → Social.
Cart drawer cross-sells show 0 items
Two possibilities:
- The cart's items have no cross-sell IDs set on the WC products. Assign cross-sells via Products → edit → Linked products → Cross-sells.
- The fallback query (same-category popular) returned no matches. Confirm the products in the cart have a category assigned, and that category has other in-stock published products.
Search autocomplete returns 0 results
- Endpoint check:
curl 'https://dankcave.com/wp-admin/admin-ajax.php?action=dankcave_search_suggest&q=dab'— should return JSON withhtmlandtotal. - Query too short — the endpoint requires ≥ 2 characters.
- Autoptimize served stale JS — clear cache.
PDP hover-zoom doesn't activate
- You're on a touch device. By design, zoom is disabled via
@media (hover: none). Mobile gets native pinch-zoom instead. - The image element is missing the
data-pdp-heroattribute. Verify in DevTools. - JS not loading — check browser console for errors.
Age gate keeps re-appearing every visit
Cookie isn't sticking. Check:
- Browser is in incognito mode → cookies are session-only. Test in a regular window.
- SameSite policy — the cookie sets
SameSite=Lax. If the browser blocks third-party cookies AND the domain is served via a proxy (Cloudflare Workers etc.), the cookie may fail. - Verify in DevTools → Application → Cookies →
dc_age_confirmedis set to1.
GA4 events not firing
- Browser console →
window.dataLayer— should be an array. If undefined, GA4 / GTM isn't installed. Configure Site Kit or GTM. - Console → trigger the action (add-to-cart, wishlist heart, etc.) → then
window.dataLayer.find(x => x.event === 'add_to_cart')— should return the event object. - If dataLayer array exists but events aren't there, check for JS errors on the page (Autoptimize's aggressive minification can occasionally break event registration — try disabling Autoptimize's JS optimization temporarily).
Wishlist doesn't persist across sessions
Wishlist is localStorage-only. It persists across browser sessions on the same device + browser, but not across devices and not across incognito → regular window.
Future: sync to user meta for logged-in customers. Phase 3 candidate.
The About page shows placeholder images
The commitment-split and category-showcase patterns pull the top-rated product image from each mapped category. If the categories don't have images (or have no products), the pattern falls back to wc_placeholder_img_src().
Fix: assign products to categories, ensure they have featured images set.
After UpdraftPlus restore, all URLs point to localhost
The restore was of a local backup. Run search-replace:
Tools → Better Search Replace (install the plugin if not present) →
- Search:
http://localhost:8090(or wherever the local was) - Replace:
https://dankcave.com - Select all tables
- Uncheck "Run as dry run"
- Run.
Then Autoptimize → Delete Cache.
Getting more help
- Filter/hook reference: see README.md → Filters + hooks section
- File map: see README.md → File map section
- Feature-specific: check the relevant page in the sidebar
If none of the above resolve, check the theme's PHP error log at wp-content/debug.log (requires WP_DEBUG_LOG in wp-config.php).