On the Appearance – Menubar settings page you can create, edit and delete menus, and for each menu add, edit, rearrange and remove menu items.
Create a menu
Menus are specified with the following fields:
- Name: the name of your menu; will be used to insert the menu in your theme.
- Template: the menu template and the stylesheet you wish to apply to this menu. You can also choose to apply a template without a stylesheet, and in this case you’ll have to provide your own CSS rules, e.g. in your theme style.css file.
Before looking at your new menu, please add at least one menu item (see the next section).
Add menu items
Menu items are specified with the following fields:
- Order: indicates where this menu item will be placed. Choices are:
- Before: this item will be placed right before the item you select.
- Child of: this item will be placed as a sub-item of the item you select; please note that to display a multi-level menu you’ll need a multi-level menu template, i.e. Suckerfish or Superfish.
- After: this item will be placed right after the item you select.
- Name: specifies the label of this menu item as shown in the menu; for instance Home, About, News, Gallery, and so on.
- Type: specifies the menu item type. Each type may require additional fields, as shown below:
- type Home: this menu item points to your main blog page (the latest posts list).
- type FrontPage: this menu item points to your static front page, if configured in WordPress Settings – Reading, otherwise it’s the same as Home.
- type Heading: this menu item is non-clickable, and could be used in a multi-level menu as the parent of a set of sub-items.
- type Tag: this menu item points to the tag archive specified in the Tag field.
- type TagList: this menu item generates a menu sub-item for each tag archive, excluding the tags specified in the Exclude field.
- type Category: this menu item points to the category archive specified in the Category field.
- type CategoryTree: this menu item points to the category archive specified in the Category field, and automatically generates a menu sub-item for each sub-category, excluding the categories specified in the Exclude field, and up to the level specified in the Depth field. Any categories selected in the Headings field will be made non-clickable.
- type Page: this menu item points to the static page specified in the Page field.
- type PageTree: this menu item points to the static page specified in the Page field, and automatically generates a menu sub-item for each sub-page, excluding the pages specified in the Exclude field, and up to the level specified in the Depth field. Any pages selected in the Headings field will be made non-clickable.
- type Post: this menu item points to the single post page whose post ID is specified in the Post ID field.
- type SearchBox: this menu item displays a search box with an optional submit button whose text is specified in the Button field.
- type External: this menu item points to the static URL specified in the URL field.
- type PHP: this menu item runs the code specified in the PHP code field and uses the label and URL returned by that code. See also The Menubar PHP type.
- type Custom: this menu item outputs the HTML specified in the HTML field – for experts only!
- CSS class: the optional CSS class you wish to apply to this menu item; multiple classes can be entered, separated by spaces.
- Attributes: the optional HTML attributes you wish to apply to your menu item (e.g.
target='_blank'
, ortitle='click me!'
); multiple attributes can be entered, separated by spaces.
You can later modify the ordering of your menu items using the Edit command or the up and down arrows in the menu items list.
Display a menu
After you create a menu, you can display it where you need it on your site. For details, please see the main Menubar page.