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)

-2
votes
1answer
14 views

Child's Theme: changing style using css id tag not working

<li id="menu-item-10" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-10"> </li> this is the html element I'm trying to access. I've tried: #menu-item-10 ...
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"> ...
0
votes
1answer
991 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
2answers
755 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
7 views

there are two items in two different sub menu when i click on any item from them it redirect to the last item of menu in wp nav menu

I have big menu in this two items which is same and its is ina different sub menu. when i click on any item from them it redirect to the last item of menu. using wp_nav_menu walker... please tell me ...
0
votes
1answer
498 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
0answers
23 views

Trouble Implementing a Custom WordPress Menu with 4 Levels of Submenus Using `wp_get_nav_menu_items()`

I am creating my first WordPress theme for a client by converting an existing website coded in static HTML, CSS, and JavaScript, using the Underscores theme for the "1000 hour head start". I have run ...
5
votes
3answers
6k views

Add Javascript to WordPress Menu

Is there a way to put javascript in the URL portion of a WordPress menu item? I have a live chat function on my site, and I am supposed to put this code onto the site to make a link to open the live ...
1
vote
2answers
622 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
0answers
10 views

WP_Nav_Walker extending, need to know count of Sub Menu Items

I have 2 different displays here. 1 for mobile and another for desktop. I need to output different html for both for just 1 menu item (the last 1) in a menu. For example, given the following Menu ...
0
votes
1answer
866 views

How to add nav menu items to a specific position within a menu

I'm adding login/logout links to a nav menu using the following code: function rp_add_login_logout_links( $items, $args ) { $link = wp_loginout( get_permalink( get_option( '...
0
votes
1answer
556 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 ...
1
vote
1answer
25 views

Wondering what these multi-colored extra pages are?

I've recently taken over managing the Wordpress site for my non-profit. The person who set it up before me has a lot of plug-ins installed and widgets set up. Additionally, there are these 5 multi-...
0
votes
1answer
22 views

get only the item you click on

I want to save the current items class id, when i click on a menu item. The problem is, that when i click on a submenu item, it will run the jQuery multiple times, because the items classes have the ...
7
votes
2answers
3k views

Add a custom walker to a menu created in a widget

I know how to add a Walker to a custom menu created by the theme (menu named primary in this example), but how can I target a menu thats created in a widget with the default wordpress custom menu ...
0
votes
1answer
24 views

Output only links using wp_nav_menu()

I have been trying to output only links when using the wp_nav_menu(). This is because I have a predefined ul and li tags for the links. This is what I did: <div class="collapse navbar-collapse" ...
2
votes
2answers
408 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
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 ...
1
vote
0answers
31 views

Getting the current menu item id from specific menu

I'm trying to get the current-menu-item-id in any page. I have used this solution, that brings me very close to the solution. The problem I have is, that the function below is going through all the ...
2
votes
4answers
609 views

Get only <ul> or <li> from the wp_nav_menu

I have tried several options like setting 'container' => false and registering the theme_location and searching on forums but I am unable to get rid of the "div" coming with the wp_nav_menu in my ...
0
votes
3answers
481 views

Wordpress cache a menu with Transient API

I want to plain to cache a page menu, that takes about 50 queries on page load. At the moment I have cache setting code with Transient API $housemenu = get_transient('housemenu_key'); if (!$...
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
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
1answer
267 views

echo same menu items across multi-site platform

I am trying to echo main theme's menu items across the headers of other sites in a WP multi-site environment and was wondering what is the proper way of doing this. I tried iframe which works but ...
0
votes
3answers
898 views

How to remove dropdown from wp_nav_menu

I dont want to have dropdown (select - options) in my wordpress menu, even in mobile or lower width devices. I know I can use css to hide it, but I want to remove it at all. I googled for an hour and ...
0
votes
0answers
14 views

Displaying menu outside site with WP API Menu

I'm new to REST API (and JSON in general) and am wondering if there's a way to display a menu from one site (a public facing site) on a private intranet so the client only needs update the menu in one ...
1
vote
1answer
696 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 ...
1
vote
2answers
833 views

Blending Foundation's Tabs with Wordpress Nav Menu & Display Active Tab

I am currently working with ZURB's Foundation Framework. It's a terrific framework and my project is coming along a lot nicer and quicker than it would have beforehand. Foundation comes with CSS/...
0
votes
2answers
376 views

wp_nav_menu(); Outside WordPress installation

I wanted to use WordPress menu management then show it on outside wordpress installion php file with html but I got this error PHP Fatal error: Call to a member function get_queried_object() on a ...
-4
votes
0answers
16 views

Why my Menu hover text color is not showing up on hover?

During creating menu I am facing a problem, which is when I hover hover on the menu it does not show menu text, basically the text color is not being chenged.How Can I do it. Please see the file here. ...
1
vote
2answers
872 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 ...
1
vote
1answer
411 views

display only the wp_nav_menu, which has the current-menu-item

i have a problem displaying only the menu with wp_nav_menu, in which the current-menu-item is in. Heres what i got: function register_menus() { register_nav_menus( array( 'sidebar-menu' =...
0
votes
0answers
11 views

How to restrict *editing* specific menus to specific roles

I have two roles: Site Publisher and Press Release Publisher. I have two menus: Main Menu and Press Release Menu. Is there a way to make it so that Press Release Publishers can only edit the Press ...
-3
votes
0answers
27 views

saving NAV-MENU triggers “Fatal error: Allowed memory size XXXX exhausted”

in One of my sites, happens unusual things(it didnt happen before) i am unable too change nav-menu. after clicking SAVE, it triggers the error Fatal error: Allowed memory size of 268435456 bytes ...
0
votes
2answers
582 views

Custom menu - different submenu for first menu item

I created a custom menu with dropdowns. (just CSS no JavaScript). I also added a custom CSS class for the first menu item. So far so good. The point were I get stuck is adding a custom dropdown only ...
1
vote
1answer
6k views

How to make a custom menu based on a category or tag?

I'd like to have a sidebar widget that has my latests featured posts, which would be marked as a category or tag. Is there a way to do this with the new custom menus, and if not, is there a plug-in ...
-1
votes
1answer
691 views

WordPress wp_nav_menu within iFrame

EDIT 2: How would I iFrame wp_nav_menu contents while maintaining the styles and script associated with their display? (Please ignore all of the below seemingly confusing context of why someone would ...
0
votes
0answers
15 views

How to remember category when using history.back?

I've set up a woocommerce store and ran into the following issue: Example: Tree-Menu-Structure: Products main-cat1 sub-cat1 sub-cat2 main-cat2 sub-cat3 Product 1: Permalink: ../main-cat1/...
0
votes
1answer
2k views

Sticky menu for WP custom menubars

This seems simple, except that I am not able to figure it out. In a wordpress theme, how can I make a custom menubar below the header image stick at the top after scrolling down the page? Example ...
0
votes
1answer
34 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 ...
2
votes
2answers
5k views

Way to bulk delete menu items in new 3.x Appearance > Menus system?

I've done some searches but maybe I'm searching on the wrong terms. Does anyone know if there's a way to bulk-delete menu items in the new Appearance > Menus system? This is mostly to clean up ...
1
vote
2answers
711 views

list category posts under its item in menu

When adding category to Menu, I need it to list all the item that belong to that category in separate UL automatically. like this http://i.stack.imgur.com/ulOOS.jpg Of course I can do that manually, ...
0
votes
1answer
460 views

Walker Class: Output Parent Description and Featured Image right after sub-menu?

I've looked around everywhere but I can't seem to find an answer to this specific case. I am attempting to output the parent description and featured image of the page right after the sub-menu ...
0
votes
0answers
8 views

How do i add a post to custom menu?

I am trying to add one of my recent posts to one of my custom menus, i legit just did it but now have forgotten please help. (using mac)
0
votes
1answer
21 views

Adding a section in line at the end of the main navigation menu in php

I'm working on a wordpress site where I'm trying to get the "Members" login/logout link & widget area inserted into the actual end of my front-end-nav-menu instead of after, as it's currently ...
1
vote
1answer
561 views

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

Remove current class from sub menu items

I am building a wordpress website with drop down menu (sub menu). To achieve this here I am using wordpress walker class. This is the code which I am using in my functions.php class ...
0
votes
2answers
792 views

Bootstrap dropdownl nav pills not working as wordpress drop down menu

I am using Bootstrap nav pills with drop-down items as WordPress menu, the menu without drop-down is looking good but when I add nested ul as drop-down the menu not working as expected.. HTML <...
-1
votes
1answer
48 views

Update wordpress menu with woocommerce products

For aesthetics purposes, i chose to keep the menu from my theme (twentyfifteen). I have a large catalog of products and i use Woocommerce to keep them into categories and products. Everytime I add a ...
0
votes
1answer
49 views

Fragment URL in navigation item without a custom link

Some of the pages in my navigation are fragmented urls that shouldn't actually go anywhere. In other words, I have a couple parent nav items like <a href="#">Services</a> that serve only ...