Articles of menus

Strange behavor of wp_nav_menu by not appearing

It is in header.php wp_nav_menu(array(‘theme_location’ => ‘top-nav’,’container_class’ => ”, ‘fallback_cb’ => ”)); in functions.php function register_custom_menus(){ register_nav_menus( array( ‘sidebar-menu’ => __( ‘Sidebar Menu’ ), ‘about-menu’ => __( ‘About Menu’ ), ‘toe-menu’ => __(‘To Exhibit’), ‘tov-menu’ => __(‘To Visit’), ‘media-menu’ => __(‘Media’), ‘top-nav’ => __(‘Top Nav’) )); } I do same thing for other theme and […]

Warnings in nav-menu when visiting query pages

Using query-wrangler, similar to drupal’s views, I created some query pages. When I visit these pages, in the top-navigation-menu there is this warning: Warning: in_array() expects parameter 2 to be array, null given in /…/wp-includes/nav-menu-template.php on line 425 The line cited by the warning is inside the ancestral post object wich I fully report here: […]

Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?

I’ve found this new plugin http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1 that is using a new 3.1 hook (wp_nav_menu_objects) to remove specific nav-menu-items from the nav-menu-item array before they are parsed by the walker class, if a user isn’t logged in. The plugin uses a specific CSS-class as identifier to decide which items to remove. So I’ve been wondering if […]

Nav Walker current menu item not displaying

I’m building a theme on top of a starter theme (wp-bootstrap) and am having trouble getting the Nav Walker to show the current menu item. current-menu-item is not there when I use a web inspector on the output html. So therefore I can’t style it. This is the code in my template file: <?php /** […]

Add a specific category at a specific place to the menu that uses wp_list_pages

I have a main menu where I display pages. All the pages have associated sub-pages, however in the menu some of them are displayed by themselves without sub-pages and some are displayed with a submenu as a list of all sub-pages. The pages in the menu are sorted according to the menu order specified for […]

How to move parent li to end of child ul

I’m working on translating a site from HTML/CSS to WordPress, and I’ve come across an issue. In the spirit of keeping the site fully customizable from the dashboard, I’ve been using WordPress’ default menu system for creating my navigation, but I can’t get it to do what it would in hard coded HTML. I need […]

selected menu item

The template I’m working on for a client has the following pages: Home : a custom static page that displays the content of a certain WP page, and the latest sticky posts. This is the front-page.php file. About us: a WP page Services : a WP page Events : a list of WP posts, in […]

Automatically Add New Tags to Sub-menu

Been searching for any related plugins or info. about this case but didn’t find anything relevant or working. I need every new tag that is added to a post automatically appear in a menu as a sub-menu item. Something like you can make pages automatically appear in a menu. Thank you very much!

Registering menu with 'Automatically add new top-level pages to this menu' selected

Is it possible to register a menu inside of a theme functions file and have ‘Automatically add new top-level pages to this menu’ pre-selected? I can’t find any info about this in the register_nav_menus documentation.

Add custom page link with anchor

In my admin section I would like to add in Appearance > Menus > some custom pages to add to my menu. I have two different menu one for the home page and one for the others pages. In my home page menu I add the menu elements as link because I need to give […]