Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Question: Is there any possibility to get next/previous page id in wp_nav_menu in wordpress.

Example: I have navigation menu like this

Menu_Item_1  (ID = 5)
  >SubMenu_Item_1-1
  >SubMenu_Item_1-2

Menu_Item_2 (ID = 11)
  >SubMenu_Item_2-1
  >SubMenu_Item_2-2

If I am on the Menu_Item_1 or any of its child pages, the id of the next top level menu item ( Menu_Item_2 in this case) must be stored in a variable and so on.

share|improve this question
1  
Not easily. While this is not a duplicate it is a solution to a similar problem and may get you started. –  s_ha_dum Apr 4 at 14:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.