Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files.

learn more… | top users | synonyms (4)

2
votes
1answer
631 views

How to add a CSS class to the tooltip on a navigation menu?

I'm looking for a way to add a CSS class to the anchor tag of the tooltip on a menu item. Currently, I see that you can easily add a CSS class to the menu's li but I'm trying to style the tooltip ...
2
votes
1answer
28 views

Where to update the Static Pages Blacklist for Multisite Install?

Where in the menu system is the link to this blacklist? As referenced in the codex https://codex.wordpress.org/Multisite_Network_Administration Also note that the blog prefix is not used for ...
2
votes
1answer
763 views

How to register custom menu widget

I'm trying to register a custom menu widget programmatically with wp_register_sidebar_widget, but it doesn't appear in wordpress. I'm using remote call of that method (xml-rpc). Referring to codex I'm ...
2
votes
1answer
175 views

Should the caching of WordPress menus be specific to each page?

Introduction In optimizing large WordPress Websites for performance I always look at caching certain parts of the Website, mostly (of course) those that require a lot of Queries/calculation. For the ...
2
votes
1answer
465 views

Custom Nav Walker to show siblings and children of current branch?

I have seen very similar (if not exact) queries to this all over Google, but always seem to find something short of what I need. I am trying to create my full vertical menu using wp_nav_menu in my ...
2
votes
2answers
262 views

How can I access the “description” of a menu item?

Where you can add your menu in under appearance > menus, I have descriptions in. In my page, I want to be able to echo out that description. Not in the menu, but in my page. How can I access this ...
2
votes
1answer
247 views

Problem with registering menus - What to do when other solutions aren't working?

I'm not able to get nav menus to register - and I'm not sure what else to try when posted solutions are not working? I've tried the solution in this post: register_nav_menus() won't register ...
2
votes
1answer
349 views

Add Submenu Link in add_submenu_page That Opens in a New Window

How can I add a sub menu link using add_submenu_page that will open a new window (target="_blank") instead of opening in the current one (default behavior)?
2
votes
2answers
324 views

wp_nav_menu show 1 item only

I was reading Wordpress documentation and also trying to find some clear example of how to do this but I couldn't, sorry if this is posted elsewhere but I did my best trying to find an answer before ...
2
votes
1answer
110 views

Put a wp_nav_menu inside another one

I've got two wp_nav_menu's defined - main and sub. The backend menu editor lets me add pages or categories or custom links to my menu, and I can place them under existing pages/categories/links. ...
2
votes
2answers
985 views

Automatically add a page to menu

I write a lot of content on a daily basis, and I have a lot of menus, submenus etc. I don't want to use the menu gui each time I create a new page/article. Is there any plugin or way of automatically ...
2
votes
2answers
763 views

Automatically generated menu

I have a menu: Activities Projects About Us News (not counting submenu items). Now "Activities" has no submenu. I created custom content type "project". My boss want to fill the menu ...
2
votes
2answers
6k views

How can I show different menu for different pages?

I have a website that has a main menu(Top-Horizontal) like this: Main menu - Home - About Us - contact us On Home page I have a link to "Company" page like this www.xyz.com/company. When I am ...
2
votes
1answer
2k views

Not able to get current menu ID

I'm trying to get the current menu item ID. I hve found one thread that has put me on the right track: How to get current-menu-item title as variable? This is the code I use in my function.php ...
2
votes
1answer
369 views

Custom Menus, Widgets & Conditional Statements

I'm employing custom widgets for my client because it's easy and they have several menus they need to create specific to site sections. I then want to allow them to add to the custom menu dynamically ...
2
votes
1answer
357 views

how to assign more permission to wordpress author

I have installed jw player plugin so that users of my site could upload their videos. Right now, admin can only see jw player menu on the admin panel and he can only upload videos and use this plugin. ...
2
votes
1answer
307 views

How to assign a WP 3.0 custom nav menu to a theme's navigation menu location via script?

I'm using this script inside a plugin to create a new custom menu on the fly and assign a page to it... $menu_id = wp_create_nav_menu( 'header-menu' ); $menu = array( 'menu-item-type' => 'custom', ...
2
votes
3answers
3k views

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 ...
2
votes
1answer
319 views

Where do custom menus get constructed?

I've created a simple menu in wp-admin>appearance>menus called main-nav. Works fine. However, I'd like to add a custom element to the end of the menu... a search box like the search box in the ...
2
votes
1answer
34 views

Creating a menu page in a Object Oriented developed plugin

I am trying for the first time to build a plugin for Wordpress following OOP way. I am having some problems while trying to create a submenu page using add_users_page() function. Here is a simple ...
2
votes
0answers
119 views

All Menu Items Disappear Seemingly at Random [duplicate]

For the last month or so, seemingly at random and with no discernible pattern, my menu disappears. However, when I look at the Dashboard, what I find is that all the menu items have been deleted but ...
2
votes
0answers
228 views

Add data-icon input to Wordpress custom menu links

I need to add a data-icon="" input to my Wordpress Custom Menu input box thing. This is so I can use an icon font and type the code in for a specific icon and in the CSS use pseudo elements to match ...
2
votes
2answers
328 views

How to create different navigation for registered users in WooThemes Canvas?

I'm building a website with wordpress and the Canvas Theme (from WooThemes). I'm using the Top navigation for displaying items when a user is logged in. When the user is not logged in, you can see ...
2
votes
1answer
528 views

Keeping parent menu items active in child pages

I'm a begginer in php and css. I would like to know how to keep an top-menu item underlined while navigating on child pages. Here is my layout: I have a navigation menu, listing all my parent pages ...
2
votes
1answer
274 views

Change menu with language?

My problem is that I have used a plugin called polylang and now it doesnät work with another more importent plugin so I need to find a solution. I use WPML on other sites and that is not an option ...
2
votes
1answer
155 views

Custom taxonomy position in admin panel

I can't figure out how to change position of custom taxonomy menu item in the admin panel. Right now I have custom post type-- custom_1-- and another custom post type-- custom_2. For custom_2, I've ...
2
votes
1answer
72 views

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 ...
2
votes
2answers
796 views

How to set limit only on top levels of wp_nav_menu?

How can I set a limit to the top level menu items in wp_nav_menu? Example: I have this menu in my admin dashboard: I would like to count ONLY the top level items and display a limited number of ...
2
votes
1answer
430 views

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 ...
2
votes
0answers
176 views

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 ...
2
votes
1answer
162 views

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 ...
2
votes
1answer
899 views

Vertical Sidebar Menu Parent and Child not displaying correctly [closed]

I am developing a WordPress site and trying to display my menu correctly. How can I display all Parent items but only show the Child items when it's Parent has been selected. I hope that makes sense. ...
2
votes
1answer
170 views

How do I approach removing menu items on the fly based on settings in my plugin?

I've started writing a plugin that allows the administrator to select specific pages and set them to be visible only to logged-in users; the plugin optionally applies the restriction to all child ...
2
votes
1answer
248 views

Add section to custom menu panel

I would like to add a new section in the custom menu panel that would allow predetermined URLs to be added to a custom menu. For example, I would like a custom post type archive page. I know that ...
2
votes
2answers
223 views

Add nav menu CSS class to body

I would like to add the CSS class of the current menu item (and the classes of its parents & ancestors) to the current page body classes. For example, if the current menu item has a CSS class ...
2
votes
0answers
362 views

Adding Custom Taxonomy Archive Link to Nav Menu Shows Up As (Invalid)

I have a custom post type "packages" with a taxonomy "Celebrations" that has a few terms in it. When I try to add a link to my wp nav menu through Appearance > Menus and choosing the term I want from ...
2
votes
1answer
4k views

Using wp_get_nav_menu_items() to list children of children pages

I'm working with a Genesis Based Theme and I'd like build a Page/ Child Page menu structure. That part I can do with the help of some code produced by Bill Erickson. Essentially what I'm trying to do ...
2
votes
1answer
5k views

How show sub menu only using wp_nav_menu()

I am using this code to show the custom menu subpages if you are on the parent page. But what this code also shows is a parent page on a page that has no sub menu, which I would like hidden. Basically ...
2
votes
0answers
228 views

wp_list_pages sort order is different for different languages [closed]

I'm using the following code wp_list_pages(array('exclude' => '','title_li' => '','sort_column' => 'menu_order')) If I switch the language the sorting is different. One of the main menu ...
2
votes
0answers
101 views

Strange behavor of wp_nav_menu by not appearing [closed]

It is in header.php wp_nav_menu(array('theme_location' => 'top-nav','container_class' => '', 'fallback_cb' => '')); in functions.php function register_custom_menus(){ ...
2
votes
1answer
152 views

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 ...
1
vote
2answers
17k views

WooCommerce dynamic menus

I have a basic WordPress site set up with the Suffusion theme and the WooCommerce plugin. This is working well for the most part, however when I have folks click / hover over the "Shop" menu icon I ...
1
vote
3answers
3k views

How to add a data attribute to a WordPress menu item

I'm Twitter Bootstrap and need to add data-toggle="modal" attribute to the a tag of menu link. Upon searching most all results reference doing a walking for Twitter Bootstrap dropdown menus however ...
1
vote
4answers
540 views

Remove Metabox from Menus screen

Been digging into WP files for a bit and think I just might be missing something. The end-goal is to remove the Theme Locations metabox from the Menus screen if someone doesn't have a certain ...
1
vote
3answers
2k views

How to add meta box to backend menu page

I need to add a meta box to the backend menu page, in Appearance->Menus (/wp-admin/nav-menus.php), to list all the available post types, both the defaults & the custom ones. It will contain a ...
1
vote
1answer
2k views

change front end menu depending on user login

How can i change my front end menu depending on if the user is logged in or not? For Example: View 1: user is not logged in menu is : home , about us, testimonials View 2: user is logged in menu ...
1
vote
2answers
1k views

Wordpress Menu Disappears when $query->query_vars['meta_key'] is set

I've set some meta variables on my WP posts. I want to be able to sort by these variables, and everything is working great except when I sort by either "views" or "likes". When I sort by either of ...
1
vote
2answers
1k views

Force PDF download from custom menu?

I added a link to a PDF in my custom navigation menu. Is there a way to force it to download instead of open?
1
vote
2answers
1k views

How to change the admin menu “Pages” to something else

When one creates a custom post type you have the ability to define various elements related to that post type which essentially allow you to define things such as the menu title, "add new post" text ...
1
vote
3answers
167 views

Remove the whole menu in the admin

How can i remove the whole menu in the admin? I have this code: function remove_menu_items() { global $menu; end( $menu ); while ( prev($menu) ) { $value = explode( ' ', $menu[ ...