Dynamically add sub menu items
I have been able to add menu items with this statement, this however creates a flat menu. The menu has been created already. I just need to add items.
wp_update_nav_menu_item(4, 0, array('menu-item-title' => __($post_title), 'menu-item-url' => home_url('/'.$url.'/'), 'menu-item-status' => 'publish'));
this is super simple to use. How do I add a sub-menu item?
$299 Affordable Web Design WordPress
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.