Menus: reorder items
menus_reorder_itemsReorder menu items sharing a parent by specifying the order of item IDs. Named items take first places, siblings follow, locked items keep their place.
Instructions
Set the order of menu items that share a parent. The items must share one parent: the ones you name take the first places in that group in the order given, other siblings follow in their current order, and locked items keep their place. To move an item under a different parent, use menus_update_item. It changes or deletes existing data, so check with the user before running it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| menu_id | Yes | Menu ID the items belong to. Find it with menus_list. | |
| item_ids | Yes | Comma-separated item IDs in the order they should appear, e.g. 301,299,300. All must share one parent. The items you name take the first places within their group; siblings you leave out follow in their current order, and locked items keep their place |