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 (6)

0
votes
1answer
32 views

Need to revert to an older version of wordpress

One of my plugins, shiftnav, does not work with the newest version of wordpress I think, how do I revert in order to fix shiftnav? It is currently making "| 500" appear on all of my menu titles
0
votes
1answer
35 views

How to add odd and even classes to all nav links through walker?

I kept finding posts that explain how to add even and odd classes to sub-menu items, but can't seem to find how to add it to the main menu items that do not have sub menus. I've already checked out ...
3
votes
1answer
28 views

Removing link '<a>' from '<li>' menu for some “links” without JS

I want some of my navigation menu items to show plain text, without a hyperlink. Usually, this code appeared: <ul class="..." id="..."> <li><a href="">my item</a> </li> &...
2
votes
1answer
31 views

Does Wordpress create mobile menus automatically?

I am using Wordpress 4.5.2 with a custom theme. I am a bit confused about WP and the theme customizations, what does the first and what the second. For example, fullscreen menus are managed by WP........
0
votes
0answers
28 views

add_query_vars_filter How to make my menu remember

I have a menu that can "open up" or "close" via JavaScript . This works. However when I click one of the menu entries the next page loads and the menu does not "remember" to be in the "open up" ...
0
votes
0answers
15 views

There is any hook that fires after/before updating menus locations in “Manage Locations” tab?

I'm looking for hook that fires before or after updating menus location. I want to fire function after saving on "Manage Locations" tab in Appearance > Menus. I know there is wp_update_nav_menu ...
0
votes
0answers
19 views

Fallback dosen't work when not using 'menu' attribute

I want my fallback function to be called when the menu doesn't contains any items. And if I specify the menu name, it works. But not when as I below comment away that attribute. Now nothing happens. ...
0
votes
1answer
15 views

Output sort number in wp menu list item?

I want to output the sort number of the list item in it, in the wp menu. No, not by using ordered list <ol>. I have tried search for answers about this by searching on wp forum an reading the ...
0
votes
1answer
28 views

Add newsletter signup element to navigation bar

I've been researching here and on other dev/WP sites to find the best solution for adding what is effectively a custom element to the navigation menu, and it seems like there are many approaches. ...
2
votes
0answers
24 views

Social Links Menu displays icon instead of text (twentyfifteen)

EDIT: I posted too hastily. I just discovered that the solution to my problem is to bypass the regular Menus section and create a custom WIDGET, which can serve as a custom menus box. Below is my ...
0
votes
0answers
23 views

How to add specific menu items to specific sub-level <td> with walker?

I want create a megamenu with four columns on 2nd level submenu (inside div and table). When I add class col1 to menu items, display them inside <td id="c1"> and when I add class col2 to menu ...
0
votes
0answers
13 views

Why does my menu disappear if I set it to something other than '--Select--'?

Trying to style it - so that it has a drop-down toggle button. So I wanted to change the files. But the other menus - that would have child elements - don't play nice with the customizer. I'll edit ...
-2
votes
1answer
28 views

How to add attribute in menu code

I want to make a menu with hover animations. My HTML syntax looks like this: <ul class="menus"> <li class="current"><a href="#" data-hover="Home">Home</a></li> <...
0
votes
0answers
27 views

Is there a global page/post/product/anything ID?

I am working on compression plugin and need to save compressed styles in to a file. Compression process is done but I need a unique page ID for any WP page in order to save and name the compressed ...
0
votes
1answer
26 views

Secondary menu in WP 4.5

There's a lot to read about secondary menus in WP, however it looks like the tricks are for older WP version. I see that WP 4.5 supports multiple menus in the dashboard. What's not clear, once you ...
1
vote
1answer
31 views

Top Menu showing as Plain text before page load [closed]

On loading the website of mine, it is showing the plain text of menu for a while and thereafter it is working fine. This is really a strange issue for me. I tried solving using this WordPress post, ...
1
vote
1answer
24 views

Wordpress is adding margins and padding to my custom menu?

I've installed wordpress on my computer so I can learn how to make custom themes and test them locally. Currently I'm playing around with some pre-made code from a tutorial so I can get more familiar ...
0
votes
1answer
21 views

How to get submenu of admin menu?

I user global $menu in one of my plugins to get the list of menu items. But i would like to get the list of of items from a submenu for example from Posts i would like to get Add new, All, Edit ...
0
votes
2answers
39 views

Admin page and admin menu. Permissions plugin

I was googlin really hard but couldn't find any answers. What i'm trying to do is write a simple permission admin page plugin. So far what i did a page with every role where i can check a certain ...
-1
votes
2answers
107 views

Wordpress Add javascript:void(0); to menu link item?

I want to add javascript:void(0); to menu link item instead of # but it is not accepting any JavaScript. Now i am thing to replace # with javascript:void(0); using filters, but could not find the ...
0
votes
0answers
34 views

Missing automatic default pages menu in twenty sixteen theme

i don't know if this is a bug or a feature in twenty sixteen theme (it also happens in twenty fifteen). In a completely new installation, wp 4.5.2, just after created 3 test pages, if I activate ...
0
votes
0answers
15 views

Change name of links in menus automatically when title of page changes

I have created a menu (Appearance -> Menus) and placed desired pages I want to have there as links. I did that for multiple languages, and I also have a few other menus for footer and sidebar. In the ...
3
votes
1answer
90 views

Making Wordpress' page and menus visible only for logged in users, checking session variables

I'm trying to login users in wordpress through an API of another platform, so what I do is use an ajax function to call an external API sending the user credentials (username, password) and getting ...
0
votes
0answers
20 views

get_pages() shows either ALL pages or just main-menu

I'm losing the battle with get_pages(). What I'd like is a list of child pages to display on each main-menu parent page. I'm trying get_pages() rather than wp_list_pages() as I'd like to be able to ...
0
votes
1answer
58 views

How to add aria role and schema markup to custom walker container

Edit: after doing some research I've found that in the wp_nav_menu function uses the following code to display the containers value. if ( $args->container ) { /** * Filter the list of ...
3
votes
1answer
41 views

Pass a parameter to a menu walker

Is there any way to pass a parameter to a menu walker? I'm trying to write a BEM-style walker, and I'd like to be able to pass a class to apply to the menu links via the walker. Something like: <?...
0
votes
0answers
21 views

Highlighting correct path with Wordpress Nav_Menu function

I have created a WordPress site for a client, in which you filter through the navigation menu (set-up in appearance->menu) by revealing hidden items (unordered lists with class "sub-menu (generated ...
0
votes
0answers
19 views

Remove/Disable “Automatically add new top-level pages to this menu”

Is there any way to disable or remove the "Auto add pages - Automatically add new top-level pages to this menu" functionality via a theme? I suppose I could hide it with a bit of CSS, but I'd rather ...
1
vote
1answer
52 views

How to display submenus on page based on referring top-level parent?

I am trying to display a secondary menu on pages that displays all the coordinating sub-pages of the top-level menu item they navigated there from, but my issue is that some pages appear under ...
0
votes
1answer
33 views

Outputting Page Title As Tooltip

I'm trying to output the page title via wp_nav_menu() as a tooltip (.pop_up). The menu text has been replaced by an icon, and using CSS to hide it. Any ideas how this could be adapted to output the ...
0
votes
0answers
7 views

submenu item under other top level menu and change some fields

I would like to add the 'Add new' user submenu to have a different name(in the menu) and under a custom top level menu that I created. I have removed most of the standard admin menu and replaced it ...
0
votes
1answer
30 views

functions.php adding item to end of menu. I want to change position

I found a function in my template that is adding a register button to the end of my menu. I'm wondering if there is any way to make this function add the register button to the beginning of my menu ...
0
votes
0answers
22 views

Menu Item Post variable count way too high, can't save menus

I'm having trouble saving WP menu items and I've done all the usual things as documented here: http://sevenspark.com/wordpress/menu-item-limit and here: Menu Items Disappearing And I know that the ...
0
votes
0answers
8 views

Set rules for file uploads to dynamically hide/show menu items

I am curious if anyone has a clue about this? Upload a file. If file meets certain criteria, link the file dynamically to a menu item If file is linked, the menu item will show. Until an associated ...
0
votes
0answers
60 views

Foundation 6 Dropdown Menu & WordPress

I'm trying to incorporate the foundation 6 dropdown menu with WordPress's menu. WordPress currently outputs <ul id="menu-menu-1" class="menu"> <li id="menu-item-24" class="menu-item ...
0
votes
2answers
36 views

Adding 'Original' URL for Custom links

I have a menu with custom links with the section of URL, however if I want to change the URL(to remove it) for some page(Sample Page) I can not, because I must provide specific URL. I want to put '...
1
vote
2answers
78 views

Partial refresh of menu in customizer not working?

WordPress 4.5 supposedly enables live refresh of the menu in the customizer, though I cannot get it to work. If I reorder the menu (in customizer) I see no changes until I perform a manual refresh. ...
0
votes
1answer
22 views

How to add columns to wordpress menu editor

Wondering if someone can point me in the right direction. Currently, I'm trying to figure out how to add columns and headings to sub menus. Naturally I want to create a basic megamenu where I can add ...
0
votes
2answers
34 views

How to request container_class from wp_nav_menu

I'm currently trying to setup a custom nav walker that will use container_class from the menu as a prefix for the class names of the list items and children. $defaults = array( 'menu' =>...
0
votes
1answer
30 views

How to separate sub-menu output and keep associated with parent

I am creating a menu like this https://squareup.com/ I have the html,css, and jquery ready. Now, I am trying to: Create the menu items with it's sub-menu items via wp-admin -> appearance -> ...
0
votes
1answer
45 views

All custom links suddenly lack href attributes

Short version: before updating to WP 4.5 and on a day when the only known change was adding a page to a submenu via the navigation menu admin all of the menu links of type Custom Link where we specify ...
3
votes
1answer
28 views

Set blog archive to active when browsing archive

I have a link to my blog archive in my main menu. When the user clicks it and the blog is displayed (on /blog/ - I have a static front-page) the link receives the "current" class (or whatever the name ...
0
votes
1answer
27 views

Custom menu with Walker class - what should the $db_fields be?

I'm trying to create my own custom menu using the Walker class and in the process of trying to figure out what's going on, I'm attempting to reproduce what wp_nav_menu() does by default, so, I've got ...
0
votes
0answers
25 views

Addressing Child Page from Custom Menu

I build the website of an association with centers in different cities. Each city's pages need their own sidebar. I want to program an automated solution where the editors dont need to select anything....
1
vote
1answer
54 views

Add div to specific sub-menu

I researched in google, yandex but had no success. With this code I can set a div to sub-menu but this code add to all sub-menus, I just need to add div to specific sub-menu. class Megratron_div ...
0
votes
1answer
42 views

How to add an attribute data-slug = “$specfic_page_slug” in WordPress menu item?

I want to add custom attribute in WordPress menu item which has specific page slug. like this - <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-101" id="menu-item-...
1
vote
3answers
204 views

Menu item added in wp_nav_menu_items filter is never highlighted

In a Twenty Thirteen child theme I append a menu item (a link to /player-number page template, where the number is different for each user and represents her or his id in a game database) using the ...
0
votes
1answer
36 views

How to create and populate with few links a menu in child theme functions.php?

The official Twenty Thirteen theme defines just a single menu in the /wp-content/themes/twentythirteen/header.php file: <?php wp_nav_menu( array( 'theme_location' => 'primary', '...
0
votes
0answers
22 views

Why is error shown twice? (how to apply menuitem to menu correctly?)

Starting to create a plugin that adds content and hooks that content into a menu (in this case below I started to add a search-functionality to hook into menu just for testing) if( !class_exists('...
1
vote
1answer
30 views

how to disable default menu classes

i want to disable default menu class, bellow code is disable menu class completely. add_theme_support( 'menus' ); add_filter('nav_menu_css_class', 'my_css_attributes_filter', 10, 1); add_filter('...