wp nav menu: show submenu below li item

It is possible to change the output of the menu, by creating a new menu Walker. I wouldn’t recommend this solution, however, since you’re attempting to do something that’s actually invalid HTML – the ul tag should only have li tags inside it, never anything else. I know it’s possible to create the solution you’re … Read more

conditional: if is page, and all subpages

Use get_ancestors to get the page parent, then check against that value instead of checking against the name. $ancestors = array(); $ancestors = get_ancestors($post->ID,’page’); $parent = (!empty($ancestors)) ? array_pop($ancestors) : $post->ID; if (!empty($parent)) { switch ($parent){ case 1 : // menu for parent page ID 1 break; case 2 : // menu for parent page … Read more

custom walker class for own menu?

this time my question is which walker class compatible with this menu structure Yes, you should be able to produce a walker to do that, but if you want markup completely different from what the menu API creates, why are you using the menu API? It is a waste of effort. However, what I would … Read more

Custom menu – different submenu for first menu item

Well, the answer depends on what you mean by “custom dropdown only for the first menu item which is different from the other item dropdowns” – different how? If it’s just stylistic, that extra class should be enough. You just have to make sure the css for it is specific enough to override the defaults. … Read more

Simple form to add custom links to menu?

Well, since you’re talking about a widget of Links…. why not just use the default Links widget that was part of core up till 3.5? http://wordpress.org/plugins/link-manager/ If you insist on limiting it to showing the latest 5 links, you’re going to have to write a bit of code (that I’m not convinced is worth it). … Read more

How do I add a menu item to a Pods admin menu?

To add submenu items to a specific Pod’s menu, try this: add_submenu_page( ‘pods-manage-your_pod_name’, ‘My submenu item page title’, ‘My submenu item’, ‘manage_options’, ‘pods-manage-your_pod_name-my-submenu-item’, ‘your_callback_function’ ); Do this during the admin_menu action in WordPress, or alternatively do it during the ‘pods_admin_menu’ action.