Title: Hash Link Scroll Offset
Author: webdevstudios
Published: <strong>2014年7月21日</strong>
Last modified: 2026年1月7日

---

搜尋外掛

![](https://ps.w.org/hash-link-scroll-offset/assets/banner-772x250.png?rev=2744401)

![](https://ps.w.org/hash-link-scroll-offset/assets/icon-256x256.png?rev=2744401)

# Hash Link Scroll Offset

 由[webdevstudios](https://profiles.wordpress.org/webdevstudios/)

[下載](https://downloads.wordpress.org/plugin/hash-link-scroll-offset.0.4.1.zip)

 * [詳情](https://zh-hk.wordpress.org/plugins/hash-link-scroll-offset/#description)
 * [評價](https://zh-hk.wordpress.org/plugins/hash-link-scroll-offset/#reviews)
 *  [安裝](https://zh-hk.wordpress.org/plugins/hash-link-scroll-offset/#installation)
 * [開發](https://zh-hk.wordpress.org/plugins/hash-link-scroll-offset/#developers)

 [支援](https://wordpress.org/support/plugin/hash-link-scroll-offset/)

## 描述

Often anchor links can be overachievers and can scroll a user past the section intended.
This plugin attempts to change that by offering a setting that allows you to change
the scroll offset when clicking anchors. It also adds a nice animated scrolling 
effect when clicking an anchor rather than the sudden jump that usually occurs. 
Even handles when visiting a hashed URL directly.

Use the `no-scroll` class on any hash links that are not meant to scroll to an area
of the page (Navigation for sliders, etc).

[Pluginize](https://pluginize.com/?utm_source=hash-link-scroll&utm_medium=text&utm_campaign=wporg)
was launched in 2016 by [WebDevStudios](https://webdevstudios.com/) to promote, 
support, and house all of their [WordPress products](https://pluginize.com/shop/?utm_source=hash-link-scroll&utm_medium=text&utm_campaign=wporg).
Pluginize is not only creating new products for WordPress all the time, but also
provides [ongoing support and development for WordPress community favorites like CPTUI](https://wordpress.org/plugins/custom-post-type-ui/),
[CMB2](https://wordpress.org/plugins/cmb2/), and more.

## 安裝

#### Manual Installation

 1. Upload the entire `/hash-link-scroll-offset` directory to the `/wp-content/plugins/`
    directory.
 2. Activate Hash Link Scroll Offset through the ‘Plugins’ menu in WordPress.
 3. Update the “Hash Link Scroll Offset” setting on the general settings page, **http://
    YOURSITE.COM/wp-admin/options-general.php**.

## 評價

![](https://secure.gravatar.com/avatar/9f51957cc23da4e52ab228cdf5f40e4657cb2d9869877ee43cc3cac77804dfcb?
s=60&d=retro&r=g)

### 󠀁[Thank you very much!](https://wordpress.org/support/topic/thank-you-very-much-143/)󠁿

 [zielniok](https://profiles.wordpress.org/zielniok/) 2025年3月19日

Does exactly what it is supposed to too. Not less, not more. Perfect.

![](https://secure.gravatar.com/avatar/2ed0ca54c775dfce378c9c0bb1feb8d1b01305faba180968c99f8cb5b8f16234?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work](https://wordpress.org/support/topic/doesnt-work-3180/)󠁿

 [valentabc](https://profiles.wordpress.org/valentabc/) 2025年1月9日 1 reply

Nothing happens with the offset activated, links behave the same.

![](https://secure.gravatar.com/avatar/eeb68938b0c80d7ff793a8f57143be2391e7db6d463338603696accd430aac22?
s=60&d=retro&r=g)

### 󠀁[Great wee plug-in – does the job on 6.0.3.](https://wordpress.org/support/topic/great-wee-plug-in-does-the-job/)󠁿

 [thenightstudio](https://profiles.wordpress.org/thenightstudio/) 2022年10月29日

Tested and working on version 6.0.3. Simple, efficient and no annoying nags or ads.
Thank you for this clean little solution.

![](https://secure.gravatar.com/avatar/45e9c141089feaea3a2f87d51823e8cddc7d58783ee6c9607150687246baa4be?
s=60&d=retro&r=g)

### 󠀁[Still works](https://wordpress.org/support/topic/still-works-200/)󠁿

 [poletaew](https://profiles.wordpress.org/poletaew/) 2022年1月25日

That’s awesome, it’s still works!

![](https://secure.gravatar.com/avatar/9aabb510f88e635782975e49e8657a6e69142335174cf51e8b2cf902e9db7fc3?
s=60&d=retro&r=g)

### 󠀁[Enfold fixed-header solution without affecting theme files.](https://wordpress.org/support/topic/enfold-fixed-header-solution-without-affecting-theme-files/)󠁿

 [James Frazier](https://profiles.wordpress.org/jamesfrazier81/) 2019年9月10日

This plugin is fantastic! So simple and effective (from this end, anyway). After
hours of fighting Enfold’s CSS and JS in my child theme, this plugin just fixed 
my fixed-positioned header overlap issue with one simple setting. Thank you!

![](https://secure.gravatar.com/avatar/c1aee8814945fadf9c63b6cfb8d5d0c76a22488ba7181342f3813efb47a89c35?
s=60&d=retro&r=g)

### 󠀁[Works ok, but…](https://wordpress.org/support/topic/works-ok-but-7/)󠁿

 [Pedro Magnifico](https://profiles.wordpress.org/pedro-magnifico/) 2018年7月10日
3 replies

Doesn’t play nice with my site’s back to top button. Click on an anchor link and
the page scrolls to the anchor with the correct offset. BUT click back to top and
the page only scrolls a little bit. Maybe by the amount of the offset, I’m not sure.
But it looked to be about that distance.

 [ 閱讀全部15個評價 ](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/)

## 貢獻者及開發者

“Hash Link Scroll Offset” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

 *   [ webdevstudios ](https://profiles.wordpress.org/webdevstudios/)
 *   [ pluginize ](https://profiles.wordpress.org/pluginize/)

[將 Hash Link Scroll Offset 外掛本地化為台灣繁體中文版。](https://translate.wordpress.org/projects/wp-plugins/hash-link-scroll-offset)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/hash-link-scroll-offset/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/hash-link-scroll-offset/)，或
透過 [RSS](https://plugins.trac.wordpress.org/log/hash-link-scroll-offset/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/hash-link-scroll-offset/)。

## 修改日誌

#### 0.4.1

 * Updated: Build process changes for compiled assets.
 * Updated: Confirmed compatibility with WordPress 6.9.

#### 0.4.0

 * Fixed: issues with window scrollY offsets

#### 0.3.2

 * Fixed: textdomain loading timing.
 * Updated: Confirmed compatibility with WordPress 6.8

#### 0.3.1

 * Fixed: instant jumps instead of smooth scroll from previous jQuery conversion.

#### 0.3.0

 * Updated: Removed jQuery dependency in our javascript
 * Updated: Escaping and sanitizing of output.

#### 0.2.2

 * Confirmed compatibility with WordPress 6.4

#### 0.2.1

 * Confirmed compatibility with WordPress 6.3

#### 0.2.0

 * Misc changes
 * Tested up to WordPress 5.9 *

#### 0.1.8

 * Adjust JS to account for relative urls.
 * Add checks for evt and event.preventDefault existing.

#### 0.1.7

 * Refactor JS to be more extensible, and adjust auto-scrolling (when hash exists
   in URL) to be more intelligent.

#### 0.1.6

 * `'hash_link_scroll_offset.scroll_to'` jQuery event fired befor scrolling is initated.
   Also introduce useful properties, `scrollTo`, `initialScroll`, and `isScrolling`;

#### 0.1.5

 * `'hash_link_scroll_offset.complete'` jQuery event fired when scrolling complete.

#### 0.1.4

 * Fix “Cannot use a scalar value as an array” debug warning. ([Relevant Trac ticket](https://core.trac.wordpress.org/ticket/29722#comment:8))

#### 0.1.3

 * Prevent browser windows from moving/blinking on initial click of anchor link.
   Props [@ImBigWill](https://github.com/WebDevStudios/Hash-Link-Scroll-Offset/pull/9).

#### 0.1.2

 * Automatically compensate for admin bar. Props [@salcode](https://github.com/WebDevStudios/Hash-Link-Scroll-Offset/pull/5).

#### 0.1.1

 * Add `no-scroll` class exception. Props [@billerickson](https://github.com/billerickson)

#### 0.1.0

 * First release

## 其它

 *  Version **0.4.1**
 *  Last updated **5 個月之前**
 *  Active installations **1,000+**
 *  WordPress version ** 5.5 or higher **
 *  Tested up to **6.9.4**
 *  Language
 * [English (US)](https://wordpress.org/plugins/hash-link-scroll-offset/)
 *  [進階顯示](https://zh-hk.wordpress.org/plugins/hash-link-scroll-offset/advanced/)

## 評分

 4.7 out of 5 stars.

 *  [  14 5-star reviews     ](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/hash-link-scroll-offset/reviews/)

## 貢獻者

 *   [ webdevstudios ](https://profiles.wordpress.org/webdevstudios/)
 *   [ pluginize ](https://profiles.wordpress.org/pluginize/)

## 支援

有話想說？需要協助？

 [檢視支援論壇](https://wordpress.org/support/plugin/hash-link-scroll-offset/)

## 捐贈

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://webdevstudios.com)