Use the Custom Menu function – no programming needed. You can simply add all of the top level pages into the menu, and then add those custom links at the end of the menu. There’s just gonna be a little bit more work to add all the pages into the Custom Menu, but really, it’s nothing compared to custom-programming the links into the code.