Title: Fixed Menu Anchor
Author: k00ni
Published: <strong>2015 年 9 月 25 日</strong>
Last modified: 2016 年 8 月 5 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/fixed-menu-anchor.svg)

# Fixed Menu Anchor

 作者：[k00ni](https://profiles.wordpress.org/k00ni/)

[下载](https://downloads.wordpress.org/plugin/fixed-menu-anchor.zip)

 * [详情](https://cn.wordpress.org/plugins/fixed-menu-anchor/#description)
 * [评价](https://cn.wordpress.org/plugins/fixed-menu-anchor/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/fixed-menu-anchor/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/fixed-menu-anchor/#developers)

 [支持](https://wordpress.org/support/plugin/fixed-menu-anchor/)

## 描述

If you are using a sticky, fixed menu in your WordPress theme, this plugin is the
best to deal with the menu overlapping your anchored content. Insert exact menu 
height to jump before your anchor target. With the PRO version you can also adjust
the value for a mobile breakpoint by width.

> **Mobile First Feature and Premium Support** 
>  The Plugins First team provides
> active one to one email support for everybody who bought [the PRO-version](https://plugins-first.io/en/product/fixed-menu-anchor-wordpress-plugin/).
> The PRO version comes with premium support and the mobile first feature.
> **General Support and Bug Reports** 
>  General support is provided within the [Support area](https://wordpress.org/support/plugin/fixed-menu-anchor)
> of WordPress.org, where you can also report bugs.

#### Highlights

 * Simple, easy to configure / setup
 * You can define a standard distance between screen top and anchor target, which
   will be used whenever maximum viewport does not apply.
 * Define a certain CSS-class, when it is attached on a link, the click event will
   be ignored.
 * Define a maximum viewport width until a certain distance between screen top and
   anchor target is to be used (relevant for mobile optimized menu – _only PRO version_).
 * Browser agnostic – It is fully compatible with all major browsers: Firefox, Chromium/
   Chrome, Safari, Opera, Edge
 * Theme agnostic – You can use it in every theme as long as jQuery library is loaded.
 * Tested up to WordPress 4.5

### Setup and Usage

 * Go to Appearence->Fixed Menu Anchor and choose the distance value.
 * That value should be a little bit higher than the fixed menu of yours.
 * After saving the value, you should jump in front of each anchor-target without
   the concerning about overlayed content anymore.

## 屏幕截图

 * [[
 * With and without the plugin – On the right side you see how it looks _without_
   this plugin: your anchor-target is overlapped by the sticky menu. In comparison
   to that, on the left side, you see how it looks _with_ this plugin: you will 
   jump a little bit before the anchor-target so it will not be overlapped.
 * [[
 * Administration user interface which contains two settings: set standard distance
   and a CSS class for DOM elements to ignore click events.
 * [[
 * Additional feature: Mobile first. It allows to set a maximum width and according
   distance, which will be used instead of the standard distance. (only PRO-version)

## 安装

 1. Upload plugin folder to the `/wp-content/plugins/` directory
 2. 通过WordPress的的“Plugins”菜单激活插件
 3. Go to Appearence->Fixed Menu Anchor and choose the distance value.
 4. That value should be a little bit higher than the fixed menu of yours.
 5. After saving the value, you should jump in front of each anchor-target without 
    the concerning about overlayed content anymore.

## 常见问题

  1. Why does it jumps when i click to an entry in my accordion/tab-menu?

Because the algorithm looks for the # sign in the URL. Unfortunately accordions 
and other menu-like structures using # to reference a target. That is getting in
the way of the plugin. But in version 2 we introduced a new feature, which allows
you to set a CSS class and the plugin will ignore all links using that CSS class.

  2. Can i forbid the plugin to fire?

Yes, you set a CSS class which indicates, that the plugin is prohibit from being
activated by a click event.

  3. I am using a mobile first theme and the menu changes based on the screen width.
Do you support different menu heights?

Yes, with version 2 (only [PRO-version](https://plugins-first.io/en/shop/)), we 
introduced a feature, that lets you set a certain screen width and a value for the
distance, which only applies until that width is reached. After the width is higher,
the default value will be used.

  4. I got weird behavior after clicking an anchor (e.g. moving to the bottom and
jumps back immediately)!

We got feedback from users that they experienced weird behavior when clicking an
anchor. In _almost all cases_ another plugin or a custom Java Script of the theme
is interfering with the Fixed Menu Anchor plugin. The reason is, that it kinda capturing
the click event to apply a certain behavior for anchor-links. If you have the same
problem, please deactivate other plugins first and see if the problem goes away.
If it persists, create a post in the [support forum](https://wordpress.org/support/plugin/fixed-menu-anchor),
together with a detailed description of your setup (e.g. installed plugins, active
theme). We will look into it and getting back to you.

## 评价

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

### 󠀁[Doesn’t seem to work with Elementor Sticky Headers](https://wordpress.org/support/topic/doesnt-seem-to-work-with-elementor-sticky-headers/)󠁿

 [macromark](https://profiles.wordpress.org/macromark/) 2018 年 5 月 3 日

I tried it briefly. Set the to margin to several different sizes, purged all caches
and tried my anchor links. No difference. The new Elementor sticky header feature
might not be supported yet.

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

### 󠀁[Does what it should do!](https://wordpress.org/support/topic/does-what-it-should-do-7/)󠁿

 [DTGGG](https://profiles.wordpress.org/dtggg/) 2016 年 9 月 3 日

Installed it, there you go.

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

### 󠀁[Did exactly what it said it would](https://wordpress.org/support/topic/did-exactly-what-it-said-it-would-1/)󠁿

 [kirkandmimi](https://profiles.wordpress.org/kirkandmimi/) 2016 年 9 月 3 日

Solved my problem, thanks.

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

### 󠀁[easy & functional](https://wordpress.org/support/topic/easy-functional-5/)󠁿

 [marc-sauerwald](https://profiles.wordpress.org/marc-sauerwald/) 2016 年 9 月 3
日

downloaded, installed & got happy 🙂

 [ 阅读所有4条评价 ](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/)

## 贡献者及开发者

「Fixed Menu Anchor」是开源软件。 以下人员对此插件做出了贡献。

贡献者

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

[帮助将「Fixed Menu Anchor」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/fixed-menu-anchor)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/fixed-menu-anchor/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/fixed-menu-anchor/)，或通过[RSS](https://plugins.trac.wordpress.org/log/fixed-menu-anchor/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/fixed-menu-anchor/)。

## 更新日志

#### 2.3

 * Full rework of the user interface in the administration area.

#### 2.2

 * Stabilization release

#### 2.1

 * Adapted to fit new requirements for WordPress 4.5
 * Improved readme.txt

#### 2.0.0 – 2.0.4

 * Added new features:
    - you can now define a maximum viewport width until a certain distance is to
      be used (only pro version).
    - you can define a certain CSS-class, when it is attached on a link, the click
      event will be ignored
 * implemented test environment on PHP and JavaScript level to improve stability
   and reduce bugs
 * tested plugin if compatible with standard theme of WordPress 4.4.2
 * added shortcut in plugin view to reach settings page faster after activation
 * bug fixing
 * removed unnecessary files (e.g. documentation of used vendors)

#### 1.0.3

 * Added helpful information for the community to participate in the future development
   of the plugin.

#### 1.0.2

 * Small adaptions to provide more good information for later usage.

#### 1.0.1

 * Added support for `id` attribute to be used to determine a target to jump to

#### 1.0.0

 * First release; introducing a way to jump right before an anchor target
 * Anchor target recognized using `name` attribute.

## 额外信息

 *  版本 **2.3**
 *  最后更新：**10 年前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 4.3 或更高版本 **
 *  已测试的最高版本为 **4.5.33**
 *  语言
 * [English (US)](https://wordpress.org/plugins/fixed-menu-anchor/)
 * 标签
 * [anchor](https://cn.wordpress.org/plugins/tags/anchor/)[fixed header](https://cn.wordpress.org/plugins/tags/fixed-header/)
   [fixed menu](https://cn.wordpress.org/plugins/tags/fixed-menu/)[sticky header](https://cn.wordpress.org/plugins/tags/sticky-header/)
   [sticky menu](https://cn.wordpress.org/plugins/tags/sticky-menu/)
 *  [高级视图](https://cn.wordpress.org/plugins/fixed-menu-anchor/advanced/)

## 评级

 4 星（最高 5 星）。

 *  [  3 条 5 星评价     ](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/fixed-menu-anchor/reviews/)

## 贡献者

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

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/fixed-menu-anchor/)