I’d like to create a menu in WordPress and use the is_page conditional to navigate the user to a specific page depending on the page they are on.
So I have 1 menu created, and one of the link buttons is “Size”. But rather than drag an item from the left pane which allows only one destination for a button I would use php.
For example if the user is on Page 2162 and they click the button they are taken to ‘page A’, but if they are on page 1593 the button takes them to ‘page B’ etc. This method would allow 1 menu to be created and managed.. I can’t see how it could be possible to create separate menus for each of the many linked scenarios (maybe if the Navigation Labels could be globally updated etc?)
Would I place the code shown in link below in my themes functions and work from here, adding all the code to my pages in?