Category Popup Menu — Plugin
WordPress Plugin
Category Popup Menu
On desktop it appears as a centered card with a smooth fade-in. On mobile it slides up from the bottom as a drawer. Results are cached after the first open, so repeat visits within the same session are instant with no loading spinner. Zero extra HTTP requests on page load.
hash-category-popup folder to /wp-content/plugins/Use the WooCommerce category’s term ID prefixed with #cat-. Find the ID in WooCommerce → Categories → hover over the category name.
<a href="#cat-63">Browse Dental Instruments</a>
Use the category slug prefixed with #cat-. More readable than numeric IDs — the slug is the URL-friendly version of the category name.
<a href="#cat-dental-instruments">Browse Dental Instruments</a>
Use the slug directly without any prefix, but add class="hcp-trigger" to tell the plugin to handle this link. Useful when you already have existing hash links.
<a href="#dental-instruments" class="hcp-trigger">Browse Dental Instruments</a>
[cat_popup id="63" label="Browse Dental Instruments"] [cat_popup slug="dental-instruments" label="Browse Dental Instruments"]
| Parameter | Required | Description |
|---|---|---|
id |
One of id / slug | WooCommerce category term ID |
slug |
One of id / slug | WooCommerce category slug |
label |
No | Link text — default is “Browse Categories” |
class |
No | Extra CSS classes added to the generated link |
requestIdleCallback), remaining trigger links are prefetched one by one with a 150ms gap — no bandwidth spike, no competition with critical resources.:root {
--hcp-width: 1100px; /* modal max-width */
--hcp-img-size: 56px; /* category image size in grid */
--hcp-radius: 12px; /* modal corner radius */
--hcp-accent: #2d7d46; /* button / link accent colour */
}
JS Memory Cache
WordPress Transients (12h)
DELETE FROM wp_options WHERE option_name LIKE '_transient_hcp_%';
tag_ID=63 where 63 is the category ID.--hcp-accent variable controls buttons and links; --hcp-width controls modal width; --hcp-radius controls corner rounding.Developed by Imran · WordPress plugin development & WooCommerce customization