Custom Nav-Links: Find TableGroup-index by table name
You probably know the possibility of adding your own links to the menus. A small disadvantage is that you have to give the target menu as a number (index of the menu). However, the number varies depending on user rights. Wouldn’t it be nice to have the index determined automatically? Here I show a small PHP function for this. Custom Menu Items According to the specs you can add custom nav-links by adding array items to the $navLinks array in hooks/links-navmenu.php. The setting ‘table_group’ => 1 causes the new menu entry to be inserted in the second menu, which is …