11 reputation
2
bio website
location
age
visits member for 2 years, 4 months
seen Apr 10 '13 at 20:07

Mar
11
awarded  Teacher
Mar
11
comment How to exclude/remove submenu using Walker_Nav_Menu
Works like a charm, my fault. Thanks bro.
Mar
11
comment How to exclude/remove submenu using Walker_Nav_Menu
Yes, i know that, both wp_get_nav_menu_items and wp_nav_menu_objects optimized the performance but i'm still stuck in the loops to get all the child menu items by menu parent ID.
Mar
11
comment How to exclude/remove submenu using Walker_Nav_Menu
Still doesn't work, it removes all the submenus in another menu parents that not custom menu .
Mar
11
answered How to exclude/remove submenu using Walker_Nav_Menu
Mar
11
comment How to exclude/remove submenu using Walker_Nav_Menu
i got the theme_location via $args : if( $args->theme_location == 'primary' )
Mar
11
comment How to exclude/remove submenu using Walker_Nav_Menu
Thanks Lê Phan Đức Trọng, it works, but the Sidebar Tabs item now jump to depth 0, that means it work only on depth 1. BTW, is there a way to apply this filter to specified menu by detecting the theme_location? and one more thing: the $item child count from 1 so we need change $items[$i] to $items[$i+1].
Mar
11
revised Grey out nav buttons unless is_user_logged_in()
edited body
Mar
11
awarded  Editor
Mar
11
revised Grey out nav buttons unless is_user_logged_in()
improve the answer
Mar
11
answered Grey out nav buttons unless is_user_logged_in()
Mar
10
comment How to exclude/remove submenu using Walker_Nav_Menu
Thanks for the suggestion, i did use the filter wp_get_nav_menu_items to unset menu items, but this way removed menu items from both admin backend and frontend. Also i tried to skip item from start_el() and end_el() but it slowdown the performance
Mar
10
asked How to exclude/remove submenu using Walker_Nav_Menu
May
20
answered Custom Meta Box Upload Image Problem