Hash Link Scroll Offset
Anchor links that stop in the right place. Free.
Got a sticky header? Then your anchor links scroll right past the heading they point to. Set an offset once and every hash link lands where it should, with a smooth scroll on the way.
Free on WordPress.org · Maintained by WebDevStudios
1,000+active installs
28K+downloads
5.0/5WordPress.org rating
Small plugin, one job
Scroll offset
Set how many pixels to stop above the target, usually your header’s height.
Smooth scrolling
An animated scroll instead of the sudden jump.
Works on page load
Visiting a URL with a #hash lands in the right place too.
Opt out per link
Add the no-scroll class to links that shouldn’t scroll, like slider or tab controls.
How it works
- Install and activate the plugin.
- Set the scroll offset to the height of your sticky header.
- Add
no-scrollto any hash links used for sliders or tabs.
Requires WordPress 5.5+.
Help and resources
Support forum
Ask on WordPress.org. We answer there.
GitHub
Report issues and send pull requests.
Changelog
What changed in each release.
Questions
What offset should I use?
The height of your sticky header in pixels, plus a little breathing room.
My slider or tabs broke. What happened?
They use hash links too. Add the no-scroll class to those links.
Do I still need it with CSS scroll-margin?
If your theme already sets scroll-margin-top on headings, maybe not. The plugin also handles smooth scrolling and links you can’t add CSS to.
Get Hash Link Scroll Offset
Free on WordPress.org.