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)

3
votes
1answer
13k views

Add “Logout” link to navigation menu

How can I add a link to the primary navigation menu with the class="right" attribute? I tried to add a static link to example.com/wp-logout.php?action=logout but that leads to a logout confirmation ...
3
votes
1answer
32 views

Generate a tabbed submenu — from taxonomy term or submenu item — with sample content

I'm looking to generate a tabbed submenu from taxonomy term or submenu item and include sample content (three items per term/submenuu item). The styling I can do, the problem is the html generation. ...
2
votes
1answer
16 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
25 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 ...
3
votes
2answers
7k 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 ...
0
votes
0answers
21 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
6 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 ...
1
vote
1answer
421 views

Wordpress Shortcode in Menu Item Title

I've looked and have not found anything that works. I am trying to include a shortcode in a menu item's 'Navigation Label'. Basically Iwould like to have a dynamic title displaying the user's name ...
0
votes
0answers
11 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. ...
1
vote
1answer
33 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
2answers
25 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 ...
0
votes
1answer
13 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
13 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. ...
1
vote
1answer
3k views

Adding menu items dynamically using wp_nav_menu_objects

On my primary navigation, I want each top level page to have a list of the subpages. So I created code that dynamically adds menu items to the primary navigation. This works only on the first level of ...
1
vote
1answer
2k views

Wordpress 3.5 dropdown menu

I'm pretty new with WordPress and I want to create my own dropdown menu without the use of any plugins. I already did some research but there are some things I do not understand. In my header file I ...
8
votes
3answers
7k views

How to manually specify the current active page with wp_nav_menu()

Is there a way of manually specifying which page is currently "active" when using wp_nav_menu()? I have a "Products" page, and on that page I have links to various (dynamic) custom taxonomies. When I ...
0
votes
1answer
709 views

How to retrieve depth of menu into template

In wp_nav_menu i use for the menu, with custom walker, i can get the $depth parameter in the start_el function function start_el(&$output, $item, $depth, $args) but, outside this ...
1
vote
0answers
13 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
5 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 ...
-3
votes
0answers
7 views

How do I 'side-align' 2 menus like mikedillard.com/blog (on a small screen width) [closed]

I've tried changing everything to inline-block (which is appears to be the display of mikedillard.com/blog--when the menus collapse into the toggle-able button) But it keeps 'stacking' on different ...
0
votes
0answers
11 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 ...
0
votes
0answers
17 views

Change Header menu links depending on which page you opened too?

Let's say in my Menus there's; Home, Movies, Language, Genre When a user select it's language, the "Genre" menu links change with the language selected. For Example if I Select French in "Language" ...
3
votes
1answer
711 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 ...
-1
votes
1answer
13 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
24 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
20 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
20 views

Top Menu showing as Plain text before page load

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, ...
0
votes
1answer
20 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
20 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 ...
-1
votes
2answers
41 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
1answer
448 views

custom menu widget where menu title is a link

I am looking for, like the title of this question indicates, a custom menu in wordpress where the menu title itself is a link. It seems like a very simple thing, but after a lot of searching I've come ...
0
votes
1answer
945 views

Splitting up a submenu into columns, or putting existing menus in another menu as submenu item

I have a menu with a long list of submenu items. I'd like to split that up into columns and the easiest way in my mind would be to have them split up into multiple . Is there a way to do this? ...
1
vote
1answer
1k views

Unable to center menu and header image twenty twelve

I have a really simple site at cyriljoyce.com on the 2012 theme I created a child theme to center the header and menu bar but just cannot seem to make it work. The child theme text is below The line ...
1
vote
2answers
733 views

3 blogs on one site with the same header menu?

Person X has default SITE with an integral blog. Person X also has SITE 2 with Blog 2 and also SITE 3 with Blog 3. Is it possible to have on the DEFAULT SITE HEADER MENU something like this: HOME ...
0
votes
0answers
17 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 ...
1
vote
2answers
715 views

Handling complex multi-level architecture / menu for large site

I am trying to get feedback and ideas for solving an information architecture / content management problem using wordpress. I have a large site ( 1,000+ pages, hundreds of posts ) made up of ...
1
vote
2answers
2k views

Nav menu items disappearing (but not immediately)

I'm working on a site where some of the nav menu items disappear (from the front end, the back end, and the database). However, debugging is extremely difficult since they don't disappear immediately! ...
0
votes
2answers
2k views

How to add ul class on nav

I've been learning to convert HTML to WordPress and want to convert on to class like this: <div class="mainmenu pull-left"> <ul class="nav navbar-nav collapse navbar-collapse"> ...
1
vote
1answer
642 views

how to change the output of wp_nav_menu using css classes

When we add a class to a menu item through dashboard, the css class is added to "li" tag of that item. Is there a way to add these css classes to "a" tag of that item, instead of "li" tag? As you ...
2
votes
2answers
1k views

wp_nav_menu() mark current item ancestor of custom post type

This solution does almost what I want it to. Only thing is, I have my menu set up as follows: Menu item 1 Menu item 2 Custom post type 1 Custom post type 2 Custom post type 3 Menu item 3 ...
0
votes
0answers
11 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
65 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 ...
1
vote
2answers
851 views

Using website header, menu and footer on Wordpress blog

I want to use the header, top menu and footer from my website on my Wordpress blog. The website itself is not a Wordpress site but the blog is and resides in a 'blog' folder on my server. So I guess ...
0
votes
0answers
18 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 ...
-1
votes
0answers
25 views

Child Theme functions.php was not running any functions

I created a child theme of twentysixteen and was trying to add a nav_menu using function register_menus() { register_nav_menu('landing', __('Landing Menu')); } add_action('init', ...
0
votes
1answer
435 views

wp_nav_menu() doesn't work

I'm working on a theme with custom menus, currently using WP 4.0.1. I'm registering two menus in functions.php: register_nav_menus( array( 'primary' => __( 'Main Menu', 'wsy' ), ...
0
votes
1answer
532 views

“Widgets” menu doesn't appear

I'm developing a WordPress theme, which works great on my localhost and one of my live servers, but on my other live server the Widgets menu (from Appearance) doesn't appear. And yes, all 3 servers ...
0
votes
2answers
1k views

Change HTML structure for custom menu in sidebar

I've been digging for documentation on how to change HTML output for the "Custom menu" which you place in optional widget. So its clear what I meen I have attached an image of the widget block here: ...
1
vote
2answers
591 views

Menu Disappears on Category Pages

I have a site whose navigation disappears on category pages for posts in the ‘post’ post type, but not for posts in any of my custom post types. The ‘post’ post type and post of the custom post types ...
0
votes
2answers
2k views

Wrapping link and .sub-menu with wp_nav_menu

I want to wrap each sub-menu ul and the tag just before it with a div. I can create the opening tag using the 'before' attribute of wP-nav_menu like this: wp_nav_menu(array( 'before' => ...