Using wp_nav_menu() so it returns the listings in an Multidimensional Array (1 post)

  1. Icethrill
    Posted 4 years ago #

    I would like some help with how I could get the results from wp_nav_menu() into an multidimensional array.

    For example:

    -> -> [<ul class="submenu">]
    -> -> -> [<li></li>]
    -> -> -> [<li></li>]
    -> -> [</ul>]
    -> [</li>]
    -> [<li></li>]
    -> [<li></li>]

    Something like that, cause I want to add in new containers around the submenu items and seperate content in them. This might be solved by some magic php function which I have no clue about. But is there anyone who can help me? Might there be an magical WordPress function for this? Have looked and googled but found nothing yet.

Topic Closed

This topic has been closed to new replies.

About this Topic