I have two menus namely : "nav-menu" and "user-menu". I just want to switch (or toggle) to a specific menu between the two menus to be primary menu whenever I visit a particular page.
For ex : If I go to some particular page then my menu programatically switches to "user-menu".
I have visited How to switch between the Primary Menus programmatically?. However, I am still not able to figure it out.
Can someone help me by giving brief explanation of the code?