The quickest way to add a sticky back-to-top button in WordPress is to install a dedicated plugin, configure its fixed position and scroll trigger, and test it against your header and other floating controls. Block-theme users can also insert a Back To Top block, enable native sticky positioning in theme.json, or build an accessible button with HTML, CSS, and JavaScript.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
What a sticky back-to-top button does
A back-to-top button is a control that returns the visitor to the beginning of the current document. “Sticky” describes how it stays attached to the viewport while the page moves: normally it is position: fixed or an equivalent floating element, rather than an item that scrolls away with the content.
Most implementations keep the control hidden at the top of the page, reveal it after the visitor has scrolled a useful distance, and move the document to the top when it is activated. That avoids displaying a button before it has a purpose and keeps long articles easier to navigate on phones and desktops.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →There are four practical WordPress routes:
- A dedicated plugin is the fastest no-code option.
- A block-editor block adds the control from the editor and keeps its settings in the site content system.
- Native block-theme positioning can make an element sticky, but it does not by itself create the scroll-to-top action or its visibility rule.
- Custom HTML, CSS, and JavaScript provide complete control when existing options do not fit the design.
Choose the right implementation
The best route depends on whether you need a simple floating control, a block that can be placed from the editor, or behavior that must be integrated with a custom theme.
As an Amazon Associate I earn from qualifying purchases.
| Route | Setup effort | Position and trigger controls | Accessibility and motion | Best fit |
|---|---|---|---|---|
| Dedicated plugin | Low | Usually includes side, bottom, reveal threshold, speed, and page targeting settings | Depends on the plugin; choose one documenting a semantic button, ARIA labeling, keyboard focus, and reduced-motion support | Most site owners who want a working feature quickly |
| Back To Top Block | Low to moderate | Inserted in the block editor; button text and icon can be customized | Listing documents smooth scrolling, reduced-motion support, ARIA labels, and keyboard navigation | Block-editor sites that want an editor-managed component |
| Native sticky block positioning | Moderate | Theme controls determine sticky placement; a separate action and visibility rule are still required | Depends on the button block or script paired with it | Block themes already using theme.json position settings |
| Custom HTML/CSS/JavaScript | Moderate to high | Fully configurable in code, including threshold, offsets, z-index, and targeting | You must implement the semantic button, accessible name, focus styling, and reduced-motion branch | Custom themes, unusual layouts, or sites needing behavior not exposed by a plugin |
Route 1: Install and configure a back-to-top plugin
Install from the WordPress administration area
- Sign in to WordPress and open Plugins → Add New.
- Search for a back-to-top plugin. If you received a ZIP file from a developer, use Upload Plugin, choose the ZIP, and select Install Now.
- Select Activate after installation.
- Open the plugin’s settings page. It may appear under Settings, as its own administration menu, or through a settings link on the Plugins screen.
Take a screenshot of the current front end before changing the design. It gives you a quick reference if a position, color, or animation setting creates a conflict.
Configure the behavior
Use the available controls for these decisions:
- Position: Select left, right, or center when offered. A lower corner is conventional, but it must not cover a mobile navigation bar or consent control.
- Offsets: Increase the distance from the bottom or side when the theme has a fixed header, cookie notice, chat control, or mobile action bar.
- Scroll trigger: Set the distance at which the button appears. Showing it immediately is usually unnecessary; revealing it after the visitor has moved down the page keeps the interface quieter.
- Animation speed: Choose a smooth-scroll duration only if it remains comfortable for your audience. A reduced-motion preference should override animation.
- Appearance: Pick an icon or text label, background and foreground colors, border, and size. The control must remain recognizable against every page background.
- Page targeting: If the plugin supports it, decide whether the button appears site-wide, on posts and pages only, or on selected templates.
Plugin options documented in official listings
NS Smooth Scroll Back to Top describes a no-code setup with configurable position, icon or text, colors, scroll speed, and a button that appears only after scrolling. AR Back To Top documents left, right, and center placement, mobile offsets, semantic button markup, ARIA labels, screen-reader text, and visible keyboard focus styling.
Recommended Free Tools
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Scroll to Top advertises more advanced controls, including 16 or more styles, progress-bar placement, sticky or fixed-header detection, scroll triggers, page targeting, ARIA labels, keyboard support, and reduced-motion handling. Sticky CTA Button documents responsive positioning, reveal-after-scroll behavior, semantic button accessibility, reduced-motion and high-contrast support, and throttled vanilla JavaScript. Top-Down Scroll documents a 10% scroll threshold, left or right placement, smooth scrolling, custom media-library icons, and output through wp_footer intended for block, classic, and page-builder themes.
Those feature descriptions are not interchangeable guarantees. Confirm the settings and compatibility information for the exact plugin version you install, then test the result in your own theme.
Route 2: Add a Back To Top block from the block editor
Install the block
- From the WordPress dashboard, open Plugins → Add New and search for Back To Top Block.
- Choose Install Now, then Activate.
- If you are installing a supplied ZIP manually, upload it through the Plugins screen. A manual installation can also place the plugin in
/wp-content/plugins/back-to-top-blockbefore activation.
Insert and configure it
- Open the editor for the template, page, or post where the control should be available.
- Select the inserter, search for the Back To Top block, and insert it where the block documentation directs.
- Set the button text. “Back to top” is clearer than an icon with no accompanying accessible name.
- Choose the default icon or provide a custom icon if the block supports it.
- Preview the page at desktop and mobile widths, then publish or update the template.
The listing for Back To Top Block documents smooth scrolling, an option that follows the visitor’s reduced-motion preference, ARIA labels, and keyboard navigation. These features are useful only when the block remains visible and usable in the final theme layout, so verify focus and contrast rather than relying solely on the feature list.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Route 3: Use native sticky positioning in a block theme
Enable the Position control
Block themes can expose a native sticky-position control through theme.json. In the theme settings, enable the position setting for supported blocks:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
{
"settings": {
"position": {
"sticky": true
}
}
}
With that setting enabled, supported blocks can receive a Position control in the editor. WordPress documents that the sticky block remains attached to its most immediate parent while the visitor scrolls.
Place the sticky element correctly
WordPress.com support recommends putting the sticky element in a top-level Group block and applying the sticky position setting. A deeply nested parent, an ancestor with clipping or overflow rules, or a container that ends early can make the element stop before the visitor expects. Keep the group’s width and stacking context in mind when placing a floating control.
Understand what native sticky does not provide
Sticky positioning controls where an element stays; it does not automatically scroll the document to the top. It also does not supply a “show after scrolling” rule. Pair the sticky block with a button block or a script that implements the click action and visibility behavior. If your theme does not expose the Position control, use a plugin, a compatible block, or custom code instead of forcing the setting into unsupported markup.
Route 4: Build the button with HTML, CSS, and JavaScript
A custom implementation has three separate responsibilities: a real interactive control, fixed visual positioning, and behavior that reveals the control and returns the document to the top. Keep these responsibilities separate so a styling change does not accidentally remove keyboard or motion support.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →1. Add a semantic button
<button id="back-to-top" type="button" aria-label="Back to top">↑</button>
Use a <button>, not a clickable <div> or a bare icon. The explicit label gives assistive technology a usable name, while type="button" prevents accidental form submission when the control is rendered inside a form.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
2. Position it without hiding page content
#back-to-top {
position: fixed;
right: 1rem;
bottom: 1rem;
z-index: 1000;
display: none;
}
#back-to-top.is-visible {
display: inline-flex;
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
The example keeps the button out of the layout and assigns a stacking level above ordinary content. Adjust right, bottom, and z-index for your theme. Do not assume that 1000 wins every stacking context: a header, consent banner, or navigation component may establish its own context.
3. Reveal it after scrolling and return to the top
const button = document.querySelector('#back-to-top');
window.addEventListener('scroll', () => {
button.classList.toggle('is-visible', window.scrollY > 300);
}, { passive: true });
button.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth'
});
});
Here, the control appears after the page has moved more than 300 pixels. Change that threshold to suit the length and navigation pattern of your pages. The click handler uses smooth scrolling for visitors who have not requested reduced motion and an immediate jump for visitors who have. The passive scroll listener lets the browser handle scrolling without waiting for the handler to cancel it.
Insert the code safely
Place the markup in the template location where the button belongs, load the CSS with the rest of the site styles, and load the JavaScript after the button exists in the document or after the DOM is ready. If your theme renders a footer hook, ensure the script does not run before #back-to-top is available. Keep customizations in a child theme or the site’s established custom-code workflow so a parent-theme update does not erase them.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
The snippets illustrate one implementation; they are not a claim that the code has been tested in a particular theme. Check for a missing element before attaching listeners if the button is conditionally rendered on some templates.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Make the control accessible
Keyboard and screen-reader behavior
- Use a semantic button with a concise accessible name such as “Back to top.”
- Keep the control in the normal keyboard order when it is visible, and provide a clearly visible focus indicator.
- Do not communicate its purpose through the arrow icon alone. Include text, an ARIA label, or screen-reader text.
- Check that activating it with Enter or Space works without submitting a form.
Motion, contrast, and target size
- Honor
prefers-reduced-motion: reduceby removing animated scrolling. - Use sufficient color contrast for the icon, text, and button boundary against changing page backgrounds.
- Make the touch target large enough to activate reliably on a phone, and leave enough surrounding space to avoid accidental taps.
- Reveal the control only after it becomes useful; a button permanently visible at the top of every page adds clutter without helping navigation.
Test with assistive technology
Tab through the page, confirm the focus ring remains visible, and activate the button without a mouse. Have a screen reader announce the control and verify that its name describes the action. Repeat the test with reduced motion enabled in the operating system or browser.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Prevent conflicts with fixed and sticky interface elements
A visually correct button can still be unusable if it occupies the same space as another viewport-level control. Inspect the bottom and side edges of the page on every responsive breakpoint.
- Sticky headers: Keep the button below the header’s lower edge when the header overlaps content. A back-to-top action should not hide behind the header after the scroll completes.
- Cookie or consent banners: Raise the bottom offset while the banner is open, or place the button on the opposite side.
- Chat widgets: Two circular controls in the same corner compete for attention and can block each other’s touch targets. Reserve separate horizontal or vertical space.
- Mobile action bars and navigation: Check both portrait and landscape orientations. A bottom navigation bar may require a larger bottom offset than the desktop layout.
- WordPress admin bar: Logged-in administrators may see the admin bar while visitors do not. Test both states so the control is not hidden behind it.
Use browser zoom and narrow viewport widths during this inspection. A layout that works at 100% zoom on a wide monitor may cover text or controls at 200% zoom.
Compare plugins and implementations by the behavior that matters
Feature counts alone do not determine whether a solution is suitable. Compare each candidate against the same questions:
| Question | Why it matters | What to verify |
|---|---|---|
| How is it installed? | Determines maintenance and who can change settings | Dashboard installation, ZIP upload, block insertion, or theme-code access |
| Where can it appear? | Prevents overlap with navigation and content | Left, right, center, side and bottom offsets, responsive rules, and page targeting |
| When does it appear? | Controls clutter and usefulness | Pixel or percentage threshold, per-page targeting, and behavior at the top of the document |
| How does it move? | Affects comprehension and vestibular comfort | Smooth-scroll speed, immediate fallback, and reduced-motion handling |
| Is it a real accessible control? | Determines whether keyboard and assistive-technology users can operate it | Semantic button markup, ARIA label, screen-reader text, focus styling, and keyboard activation |
| Does it fit the site architecture? | Avoids theme or builder conflicts | Block-theme, classic-theme, and page-builder compatibility; output location such as wp_footer |
| Does it offer more than navigation? | May justify added complexity | Progress indicators, custom media-library icons, header detection, styles, and responsive positioning |
Troubleshoot common failures
The button never appears
- Confirm that the scroll threshold has actually been crossed; a short page may never produce enough scroll distance.
- Inspect the element for a class or style that still forces
display: none. - Check that the JavaScript selector matches the button’s exact ID or block markup.
- Clear any page cache or optimization cache after changing the script or CSS.
The button appears but does not move the page
- Verify that the click listener is attached after the button is rendered.
- Look for a JavaScript error that stops execution before the click handler is registered.
- Check whether another script intercepts the click or whether the page is inside a scrolling container rather than using the document viewport.
The button is behind another element
- Inspect stacking contexts, not only the numeric
z-index. - Move the button to a different corner or increase its offsets from the competing control.
- Test logged-in and logged-out views because the WordPress admin bar changes the available space.
Smooth scrolling feels wrong
- Enable a reduced-motion preference and confirm the movement becomes immediate.
- Shorten the animation speed if the plugin exposes that setting.
- Use an immediate jump for users who request reduced motion rather than trying to override their preference with CSS alone.
The native sticky option stops early
Review the block’s most immediate parent. Native sticky positioning attaches to that parent, so a short or clipped container can limit how far the block remains visible. A top-level Group block, as recommended by WordPress.com support, gives the element a parent that better matches the page’s scrolling region.
A practical decision checklist
- Choose a dedicated plugin when you want the quickest setup and do not need custom code.
- Choose Back To Top Block when editors should insert and configure the control through the block editor.
- Choose native sticky positioning when your block theme already uses
theme.json, but add a separate button action and reveal rule. - Choose custom code when you need exact thresholds, offsets, markup, or integration with a bespoke theme.
- Regardless of route, require a semantic button, an accessible name, visible focus, reduced-motion support, adequate contrast, and a usable touch target.
- Test the control with the sticky header, consent banner, chat widget, mobile navigation, browser zoom, and WordPress admin bar before considering it finished.
Final implementation check
Open a long page in a private browser window and scroll beyond the chosen threshold. Confirm that the button appears only then, stays in the intended viewport position, and returns the document to the top when clicked or activated from the keyboard. Repeat at a narrow width, with browser zoom, with reduced motion enabled, and while logged in. Those checks catch the practical failures—overlap, inaccessible focus, unwanted animation, and theme-specific positioning—that a successful installation screen cannot reveal.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.




