Schema Documentation
MenuItem
Description
Navigation menu items are the individual items assigned to a menu. These are rendered as the links in a navigation menu.
Fields
Field Name | Description |
---|---|
childItems -
MenuItemToMenuItemConnection | Connection between the MenuItem type and the MenuItem type |
Arguments
| |
connectedNode -
MenuItemToMenuItemLinkableConnectionEdge | Connection from MenuItem to it's connected node |
connectedObject -
MenuItemObjectUnion | The object connected to this menu item. Deprecated in favor of the connectedNode field |
cssClasses -
[String] | Class attribute for the menu item link |
databaseId -
Int! | The unique identifier stored in the database |
description -
String | Description of the menu item. |
id -
ID! | The globally unique identifier of the nav menu item object. |
isRestricted -
Boolean | Whether the object is restricted from the current viewer |
label -
String | Label or title of the menu item. |
linkRelationship -
String | Link relationship (XFN) of the menu item. |
locations -
[MenuLocationEnum] | The locations the menu item's Menu is assigned to |
menu -
MenuItemToMenuConnectionEdge | The Menu a MenuItem is part of |
menuItemId -
Int | WP ID of the menu item. Deprecated in favor of the databaseId field |
order -
Int | Menu item order |
parentDatabaseId -
Int | The database id of the parent menu item or null if it is the root |
parentId -
ID | The globally unique identifier of the parent nav menu item object. |
path -
String | Path for the resource. Relative path for internal resources. Absolute path for external resources. |
target -
String | Target attribute for the menu item link. |
title -
String | Title attribute for the menu item link |
uri -
String | The uri of the resource the menu item links to |
url -
String | URL or destination of the menu item. |
Example
{"childItems":MenuItemToMenuItemConnection,"connectedNode":MenuItemToMenuItemLinkableConnectionEdge,"connectedObject":Post,"cssClasses":["xyz789"],"databaseId":123,"description":"xyz789","id":"4","isRestricted":true,"label":"abc123","linkRelationship":"xyz789","locations":["FOOTER"],"menu":MenuItemToMenuConnectionEdge,"menuItemId":123,"order":123,"parentDatabaseId":123,"parentId":"4","path":"xyz789","target":"abc123","title":"abc123","uri":"abc123","url":"xyz789"}