Skip to content

Instantly share code, notes, and snippets.

View Chukatuk's full-sized avatar

Alex Leibowich Chukatuk

  • Haifa,Israel
View GitHub Profile
@Chukatuk
Chukatuk / getMenuHierarchically.php
Last active April 20, 2017 13:07 — forked from vwasteels/getMenuHierarchically.md
Retrieve menu items hierarchically in Wordpress
```php
/**
* Get Menu Items From Location
*
* @param $location : location slug given as key in register_nav_menus
*/
function getMenuItemsFromLocation($location) {
$theme_locations = get_nav_menu_locations();