I am creating a menu item using the following code.
$item = array(
'link_path' => 'node/custom',
'link_title' => 'Custom Title 001',
'menu_name' => 'menu-custom-menu', // Menu machine name, for example: main-menu
'weight' => 0,
'plid' => 0, // Parent menu item, 0 if menu item is on top level
'module' => 'menu',
);
menu_link_save($item);
I can see the entries is menu_links table, but can not see this menu item under the menu at 'admin/structure/menu/manage/menu-custom-menu'. What is wrong with my code?
Please note this path('node/custom' actually doesn't exist in Drupal System.