MAJpage Menu Class Extender

MAJpage Menu Class Extender Install Statistics

0
100%
Today: 0 Yesterday: 0 All-time: 5,769 downloads
MAJpage Menu Class Extender Icon

Try plugin: MAJpage Menu Class Extender

We'll create fresh WordPress site with MAJpage Menu Class Extender installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About MAJpage Menu Class Extender

Adds classes to first, last, parent, even and odd elements of wp_page_menu and wp_nav_menu.

1


0


0


0


0

updated: 5 years ago
since: 13 years ago
author: Wiktor Maj

Description

This simple plugin was written to add classes to first, last, parent, even and odd elements of wp_page_menu and wp_nav_menu to support recognizing it in older browsers without :first-child, :last-child and :nth-child supporting.

Plugin adds the following classes to menu <li> tags:

  • “first-menu-item” to every first child of <ul> or <menu> tag,
  • “last-menu-item” to every last child of <ul> or <menu> tag,
  • “parent-menu-item” to every child of <ul> or <menu> tag that has another <ul> or <menu> tag inside (a parent to another menu level),
  • “odd-menu-item” to every odd child of <ul> or <menu> tag, including first and/or last child,
  • “even-menu-item” to every even child of <ul> or <menu> tag, including first and/or last child.

    Above classes are added separately to each menu level. Plugin use SimpleXML extension and requires PHP 5 or higher. Menu should have valid XHTML code.