Menu Toolswordpress_create_menu_item
Menu Tools

wordpress_create_menu_item

Create a new menu item (page/post/category/custom URL) in a WordPress menu.

wordpress_create_menu_item

Create a new menu item. Can link to pages, posts, custom URLs, or categories.

Parameters

ParameterTypeRequiredDescription
menu_idnumberYesMenu ID
titlestringYesMenu item title
urlstringNoCustom URL (for custom links)
object_typestringNoObject type: "post", "page", "category", "custom", etc.
object_idnumberNoID of the linked object (post ID, page ID, etc.)
parentnumberNoParent menu item ID for nested items
positionnumberNoPosition in menu (1-based)
targetstringNoLink target ("_blank" for new window)
classesstringNoCSS classes (space-separated)
attr_titlestringNoTitle attribute (tooltip)
descriptionstringNoItem description

Response

{
  "success": true,
  "item_id": 1005,
  "menu_id": 10
}

Example Prompts

  • "Add a 'Contact' link to my primary menu pointing to /contact"
  • "Add page 42 to menu 10"
  • "Add an external link to the menu that opens in a new tab"
Was this page helpful?
Built with Documentation.AI

Last updated Dec 15, 2025