JML1179
JML1179

Reputation: 35

Plugin create a navigation menu

How can I have a plugin (once installed) build a menu in the Appearance >> Menu area? I would like my plugin to make a menu called "office" and put 5 links on it. That way I can call that specific menu on a template the plugin installs.

Thanks in advance

PS I am not looking to build a menu item in the admin area. I want a navigation menu to be built in the APPEARANCE>>MENU area of the site.

Upvotes: 1

Views: 883

Answers (1)

brasofilo
brasofilo

Reputation: 26065

You're looking for wp_update_nav_menu_object and wp_update_nav_menu_item.

Check this WordPress Answers post for a working example.

Upvotes: 1

Related Questions