mirror of
https://ghproxy.net/https://github.com/wp-cli/handbook.git
synced 2026-07-27 12:47:14 +08:00
21 lines
459 B
Markdown
21 lines
459 B
Markdown
# wp menu item
|
|
|
|
List, add, and delete items associated with a menu.
|
|
|
|
### EXAMPLES
|
|
|
|
# Add an existing post to an existing menu
|
|
$ wp menu item add-post sidebar-menu 33 --title="Custom Test Post"
|
|
Success: Menu item added.
|
|
|
|
# Create a new menu link item
|
|
$ wp menu item add-custom sidebar-menu Apple http://apple.com
|
|
Success: Menu item added.
|
|
|
|
# Delete menu item
|
|
$ wp menu item delete 45
|
|
Success: Deleted 1 of 1 menu items.
|
|
|
|
|
|
|
|
|