Getting started
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Anchor has a two-field settings screen, so setup is quick: install, enable the bar, set a scroll threshold, then scroll a product page to confirm it.
Before you start
Section titled “Before you start”- WordPress 6.5 or newer
- WooCommerce 8.0 or newer (HPOS and Cart/Checkout Blocks compatibility are declared)
- PHP 8.1 or newer
Anchor only boots when WooCommerce is active. If WooCommerce is missing, Anchor shows an admin notice and does nothing else.
Install
Section titled “Install”- Install WooCommerce and make sure it is active.
- Install Anchor from the plugin directory (when live on WordPress.org) or upload the
anchorfolder to/wp-content/plugins/. - Activate the plugin. On first activation Anchor seeds its defaults, the bar is enabled with a 300 px scroll threshold, so the bar is already live.
Configure
Section titled “Configure”Open WooCommerce → Anchor (the screen needs the manage_woocommerce capability, so shop managers can reach it, not just administrators). There are two controls:
- Enable the bar, a master on/off toggle. When off, the bar never renders and its CSS and JS are never enqueued, so there is zero front-end impact.
- Scroll threshold (px), how far past the native add-to-cart form the shopper must scroll before the bar appears. Accepts 0-5000, steps of 10; 300 is the default and a good starting point. The screen shows the current value back to you as a hint.
Both values are stored in a single anchor_settings option and clamped on save: a threshold below 0 becomes 0, above 5000 becomes 5000.
Verify on the storefront
Section titled “Verify on the storefront”- Open a simple, in-stock product and scroll past the main add-to-cart form. The bar should slide up from the bottom with the title, price and an Add to cart button. Scroll back up and it tucks away.
- Open a variable product. Before you pick options the bar shows a Choose options button, click it and the page scrolls back to the variation selectors and focuses the first one. Pick a valid combination and the bar’s price updates and the Add to cart button enables.
- Confirm there is no layout shift: the bar is fixed to the viewport and starts hidden, so revealing it does not push content around.
What you cannot configure (by design)
Section titled “What you cannot configure (by design)”There is no top/bottom position choice (the bar is always at the bottom), no per-device show/hide, and no thumbnail or quantity field. The bar is intentionally minimal: title, price, button. The one thing you tune is the reveal point.
Performance and accessibility
Section titled “Performance and accessibility”The stylesheet and script load only on single product pages and only when the bar is enabled; the script is deferred and in the footer. The bar is an ARIA region with a visible focus ring and an accessible label, and it respects prefers-reduced-motion and prefers-color-scheme.
Need help?
Section titled “Need help?”- Configuration, the two settings, what is fixed, and the developer hooks
- Using the sticky bar, the full shopper-facing behaviour
- GitHub issues
- Anchor on plogins.com