enqueue script during add menu items means before save menu items
Because this menu items are appended with ajax response you need to run this JS functions again for each item that you add to the menu with the document#menu-item-added event. Add something like this in your JS file. $(document).on(‘menu-item-added’, function(event, markup) { // debug that the hook work console.log(markup); $.each(markup, function(index, menuItem) { if(menuItem.id) { … Read more