Get Navigation Menu name, pages and subpages into a variable

Question

If I have a defined Nav Menu that is named MAIN MENU

and within MAIN MENU are the pages:

  • Main Page
    • Sub Page I
    • Sub Page II
    • Sub Page III
  1. What is the appropriate terminology used for Main Page and Sub Pages nested under it (they’re not defined as parent/child pages)
  2. How to retrieve Main Page and Sub Page I-III into a variable.
  3. How to conditionally check if there are Main Pages or Sub Pages

The purpose is to build a breadcrumb other than using get_the_ID() and wp_get_post_parent_ID() with parent/child pages

0
Valeron 8 months 2020-11-27T07:10:30-05:00 0 Answers 5 views 0

Leave an answer

Browse
Browse