Title: Custom Menu Class
Author: Aiken1
Published: <strong>2015 年 6 月 3 日</strong>
Last modified: 2016 年 4 月 25 日

---

搜索插件

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

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

# Custom Menu Class

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

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

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

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

## 描述

Simple plugin that adds extra functionality to menu items. The plugin will allow
to set predefined CSS classes (Select field) to menu items.
 Support for the plugin“
If Menu”: https://wordpress.org/plugins/if-menu/ – does not break the “If Menu” 
plugin.

Example of defining CSS classes for menu items is in the “FAQ” tab here.

Custom Menu Class is 100% free. if you have questions or need additional information
u can comment on my website ( http://deving.de – http://deving.de/blog/wordpress/
2292-wordpress-plugin-fuer-voreingestellte-css-klassen-fuer-menue-links/ ) or in
the “Support” tab here.

Check out my [Themeforest Account](http://themeforest.net/user/Aiken1/portfolio?ref=Aiken1)

## 屏幕截图

 * [[
 * Here’s a screenshot of it in action

## 安装

To install the plugin, follow the steps below

 1. Upload `custom-menu-class` to the `/wp-content/plugins/` directory
 2. 通过WordPress的的“Plugins”菜单激活插件
 3. Define CSS classes for menu items in the ‘Options -> Menu CSS Classes’ settings
    page
 4. Set predefined CSS classes for your menu items in ‘Appearance -> Menus’ page – 
    Choose CSS classes from the select field (multiple selection is possible)

## 常见问题

  How can I set the CSS classes?

Set the CSS classes in the Custom Menu Class settings page under ‘Options -> Menu
CSS Classes’

## 评价

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

### 󠀁[Good, but disappears when used with menu icons plugin](https://wordpress.org/support/topic/good-does-what-its-supposed-to-do/)󠁿

 [yesyeswordpress](https://profiles.wordpress.org/yesyeswordpress/) 2017 年 1 月
29 日

Nice and simple. However, if you have this menu icons plugin installed; https://
wordpress.org/plugins/menu-icons/ ..it doesn’t work, nor do you even see an option
to select css classes. Also, could’ve been even more simple if it worked like WP
used to work; simply a text field in the menu settings underneath each item, where
you write your css classes.. That would be more straightforward and not require 
to go to another settings page to create classes. Hope that can be changed in the
future?

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

### 󠀁[Simple and easy . Working fine. Nice plugin.](https://wordpress.org/support/topic/simple-and-easy-working-nice-nice-plugin/)󠁿

 [hatez](https://profiles.wordpress.org/hatez/) 2016 年 12 月 25 日

Good plugin

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

### 󠀁[Great Plugin](https://wordpress.org/support/topic/great-plugin-10757/)󠁿

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

Work correctly!

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

### 󠀁[Works as it should](https://wordpress.org/support/topic/works-as-it-should-32/)󠁿

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

🙂

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

### 󠀁[I could not make it work](https://wordpress.org/support/topic/no-good-12/)󠁿

 [Pedro Magnifico](https://profiles.wordpress.org/pedro-magnifico/) 2016 年 9 月
3 日 2 回复

Installing this plugin removed my theme’s built in options for configuring menu 
items and replaced them with a panel that only allows you to apply a style but I
was unable to create any styles. There is a panel that lists all styles in the Settings
panel (mistakenly referred to as Options in the instructions, unless I misunderstood)
but no “add new” button. So I was unable to create a class, rendering the class 
pulldown in the menu builder ineffective.

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

### 󠀁[no work](https://wordpress.org/support/topic/no-work-19/)󠁿

 [alex1nd](https://profiles.wordpress.org/alex1nd/) 2016 年 9 月 3 日 1 回复

no work

 [ 阅读所有7条评价 ](https://wordpress.org/support/plugin/custom-menu-class/reviews/)

## 贡献者及开发者

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

贡献者

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

[帮助将「Custom Menu Class」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/custom-menu-class)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.1

 * Plugin release. Basis for this plugin is “If Menu”: https://wordpress.org/plugins/
   if-menu/

#### 0.1.2

 * Added screenshot
 * Bugfix: Filter function name

#### 0.2.0

 * Added plugin settings page for CSS classes (Options -> Menu CSS Classes)

#### 0.2.1

 * Fullwidth select field for menu CSS classes

#### 0.2.2

 * Bugfix: Added wp_reset_query
 * Bugfix: Changed _e() to __()

#### 0.2.3

 * Notice: removed deprecated argument caller_get_posts and added ignore_sticky_posts

#### 0.2.4

 * changed wp_reset_query to wp_reset_postdata

#### 0.2.5

 * changed WP_Query to get_posts

#### 0.2.6

 * bugfix get_post_meta in wp 4.5

#### 0.2.6.1

 * bugfix get_post_meta in wp < 4.5

## 额外信息

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

## 评级

 3.2 星（最高 5 星）。

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

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

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

## 贡献者

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

## 支持

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

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