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
39 views

Multiple navigation menu in same location

Is it possible to have multiple menus in same location but on different pages. My pages are now: cars --car details --car specs motorbikes --motorbike dealers --map --contact Plus about 20 other ...
0
votes
0answers
60 views

How to add mobile only, multi-level menu?

What is the Wordpress way to adding a second menu? Not in the backend but programatically; so that it gets activated only when screen size is certain width. basically two menus- one for full sized ...
0
votes
0answers
37 views

Respect hierarchy when adding all Product category items to a menu

When I go to appearance => menus, to be able to see the WooCommerce categories/subcategories I go to screen options and select product categories. I see the option "Product Categories" on the left ...
0
votes
1answer
19 views

Menu's built in the edit theme view do not have active states set when on child pages

have a menu that is pulled in like this: <?php wp_nav_menu ( array('menu' => 'header') ) ?> I am using WooCommerce and when visiting /shop the shop link in the header has the class: ...
0
votes
3answers
30 views

Cannot add home page url to menu with #

I am adding a #section as a custom link to my menu, because I want to scroll to that section when I click on that link. When I'm on the home page, this works fine (the section is on the home page), ...
1
vote
1answer
59 views

Only append custom classes to nav menu items

I was reviewing this extremely helpful post on cleaning up WP-generated classes and ids from the nav menu, and found RevelationTravis's option-- see code below-- to be particularly good as a way to ...
0
votes
1answer
32 views

Two theme locations for two menus, but only one is showing up

Here is what I try to achieve. I have two menus. One is going to be a top navigation that lists all the pages, and the other one is going to list post categories. in my header.php, I included the ...
0
votes
0answers
29 views

How do I put my Blog posts on two or three different pages?

So my site has a static front page and a blog page on my website, but I would like to show my blog on both the blog page and the static front page. Also, I have several pages representing several ...
0
votes
1answer
19 views

wp_nav_menu custom Page class

I am building a multilingual site with Polylang, and need to add custom class to my menus that groups together Pages about the same content. For example, I have a Page "Happy" and it has a translated ...
-1
votes
1answer
24 views

How to prevent uppercasing of menu titles

My category names are being converted to uppercase when I use them as menu items. Here's how I created a category: And here's how it is displayed: Is the theme doing this or is it WordPress ...
0
votes
0answers
38 views

how to made customize wp_nav_menu walker with search box

how to made customize wp_nav_menu walker with search box. <ul class="main-navigation"> <li class="course"> <!-- <a href="#">Course</...
0
votes
0answers
33 views

Add new nav menu item programmatically

I want to add new nav menu item and in the same time create new page, so my questions are: Is it enough to use wp_update_nav_menu_item() to create new page and new item in existing nav menu? And if ...
0
votes
0answers
21 views

Display parent menu item of the walker nav menu item

I have pointed the numeric index in here. each index in described below: 1. It is where the name of the currently active menu displays, 2. It is where the submenu of the parent page ...
0
votes
1answer
24 views

Nav menu from plugin to theme

I would to take nav menu reference (I have id and class) from plugin to theme header.php...How can I do this? I used something like this<?php wp_nav_menu('id'); ?> but of course with failure ...
0
votes
0answers
34 views

Is there a way to retrieve post meta data from wp_get_nav_menu_object?

I am trying to integrate flexslider into my theme. I want all my post to default to flexslider post and I want to be able to customize the order of these post/slides using custom menus on the ...
0
votes
0answers
17 views

Has there been any improvements to wp's menu handling?

So I've been snooping around to see if there has been any change to how menus work in WP, but I haven't found anything yet. Some of the problems I have expereinced: Menu items still remains ...
0
votes
0answers
74 views

Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error

This is a bug in my WP install that has crept up unknowingly; I can't say for sure when it began. To describe it: there were menus created in the Appearance -> Menus page early in the site's history, ...
0
votes
1answer
33 views

Insert menu into theme location depending on user logged in/out status

I am using the Avada Theme from Themeforest and I have set up 2 menus under Appearances > Menu: menu-logged-in which contains a parent item (My Account) and then several child items; and menu-...
0
votes
0answers
11 views

A new post is showing under two menu's, how do I get it to only show under one?

I have recently added two new films to my site 'Hellesylt' and 'Artists on Film' and they appear twice, once under 'Film' and again under 'Photography', the new films do not appear on the drop down ...
0
votes
1answer
50 views

How to add custom nav_menu_css_class to certain menu only?

I want to add a custom CSS class to menu items. So far, I got it working by using the filter hook nav_menu_css_class. However, I want to add this class to items of a specific menu only. So, how must ...
-1
votes
3answers
44 views

I want my homepage navbar to have different styling to the rest of my site, how can I do this?

I am using the genesis framework, all I literally want to do is remove the navbar background colour for the homepage only. All my attempted changes have affected all the navigation menus.
0
votes
0answers
18 views

How do I redefine wm_navigation() or wp_logo() within a theme that uses hooks?

What I want to do: Move the title of my website from it's current location to be in the "menu" div so that it is to the left of the menu/page list. Demo page: http://aaronmoore.me/visartsassignments/ ...
0
votes
0answers
13 views

Get object_id with level from custom menu?

I need to get an array from a custom WP menu, which includes page object_id and it's depth/level in menu. I need this to build a table of contents in mPdf. Any thoughs?
1
vote
0answers
26 views

Show all data in database table and make it into an interactive table

I have to make a table where my data from my database can be stored and rearranged with every row. The name of every row should be a link to the function mymanual_edit(). Look at the image for ...
0
votes
1answer
51 views

How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?

I want the top nav on a wordpress site to automatically show the child pages. I know that I can edit my menu and add the children, but I want them to appear automatically, and for the menu to update ...
0
votes
1answer
33 views

Where to implement custom walker class?

I have created a custom walker class for changing the output of menu items. Where do I place my custom walker class file at? I have tried to ask on the Wordpress forum but it has gone 3 days with no ...
0
votes
2answers
59 views

Current menu item class issue

I'm trying to stylise my navigation menu regarding selected page. I made a page for news, but when I click on the following pages (page 2 for example), the navigation menu loses its class. I want it ...
0
votes
0answers
40 views

How to create a HTTP custom link in a WordPress menu in a HTTPS site without a plugin

Imagine a WordPress site over SSL. Let's say https://example.net. All the URLs of the site are HTTPS. That's cool. Imagine this site has a WordPress menu and you want to include a custom link to a ...
1
vote
1answer
42 views

Is there a way to add a class to non current menu item?

When using the wp_nav_menu function, the current menu item markup usually is like so: <li id="menu-item-19" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item ...
0
votes
0answers
30 views

automatically add custom taxonomy items into menu

I wish custom taxonomy items to appear in menu automatically. Currently I have custom post type with custom taxonomy. function ales_create_post_types() { register_post_type( 'ales_product', ...
1
vote
3answers
147 views

On which hook should I be calling register_nav_menu(s)?

I've variously seen register_nav_menus() called: on after_setup_theme on init pasted "loose" into functions.php with no apparent change in functionality. Which hook should I be using to call this ...
0
votes
0answers
77 views

wp_nav_array() With A Hamburger Menu

I don't understand how the wp_nav_array works even after reading the codex thoroughly and I'm having issues with adding a menu. My html + css looks like this: <!-- Header --> <header id="...
0
votes
1answer
70 views

Adding Additional Variables on Menus Page

I'm learning PHP by building a plugin to show or hide menu items based on a user's location. I am a bit stuck at the moment. In the function below, the text input is being saved to the database, but ...
0
votes
1answer
44 views

how to insert data in li tag of navigation

I'm trying to insert an image for each of my navigation items without any plugins. I'm not much of a coder, but I googled for something called walker, but not sure if this should be done for my case. ...
0
votes
0answers
9 views

Query Code Making Menu Disappear

I'm trying to display only certain tags on my site, but when I use the code my menu disapears. Heres what I have: $query->set('tag', 'break','crunch'); return $query; I have this placed in the ...
0
votes
1answer
36 views

WordPress menu>Custom Link: removing my link formatting and adding %20

I am pasting this url: <a href="#" id="event_inquiryToggle">TEST</a> into WordPress Custom Link menu item. When I hit save it saves it as such: http://a%20href=#%20id=...
0
votes
1answer
50 views

switch_to_blog() and wp_nav_menu() not functioning properly

I have an MU plugin active on the network with this small function to query menu 4 from the main site in my network. On the main site in the network (1) things work as expected. On the sub sites in ...
0
votes
1answer
101 views

New walker for walker_nav_menu to change inside container data

I'm not really good with coding, but I have googled a lot and edit some script and it worked, but I can't achieve what I need. This is the code: class description_walker extends Walker_Nav_Menu { ...
0
votes
1answer
117 views

Loop through Navbar, Output Icons

I'm trying to loop through my Navbar in WordPress so that I can output some Icons at the end of the last link. I have this working but I end up outputting a Navbar and a list. I think this is because ...
0
votes
2answers
122 views

How to Add <span> to Each Menu Link with link text to data-attr?

how do i get something like below my code is like this. wp_nav_menu( array( 'theme_location' => 'header_menu', 'container_id' => 'menu', 'link_before' => '<span ...
0
votes
0answers
35 views

Javascript in WordPress Navigation - mobile menu

I added a Live Chat link to my WordPress navigation menu. I followed the Ideal solution #2 below which works great on the desktop, but not on the mobile menu. It doesn't do anything on mobile. Any ...
-1
votes
2answers
43 views

My Menu Disappears on my Custom Link Homepage on Mobile

My menu on my custom link homepage disappears on mobile, or when the window is small on web browsing. The thing is on all my other pages on mobile, the menu is there in the form of three lines - as a ...
0
votes
1answer
71 views

How to undo the last changes to a custom menu?

I have a wordpress site with a custom menu. When I want to add a page or something to the menu, I click appearance, add the item, then drag it to the right location. This time when I did it the menu ...
0
votes
0answers
54 views

Cannot get custom links to show using wp_get_nav_menu_items

$args = array( 'post_type' => 'nav_menu_item', 'post_parent' => $id, 'orderdby'=> 'menu_order', 'output' => ARRAY_A ); $childs = wp_get_nav_menu_items( 4, $args ); ...
0
votes
0answers
44 views

How to add custom pages to menu programmatically?

So I need to add some pages when it created to the menu within plugin. Menu id is 125. Pages have taxonomy gp_hubs. $category = wp_insert_term($name, 'gp_hubs'); foreach ($sub_categories as $sub_cat)...
0
votes
0answers
59 views

Display page content with Boostrap modal from the menu

Been searching for a solution but I'm not finding one or I'm getting confused. My goal is to be able to create a page in WordPress, enter the content and add the page to the Pages Panel under Menus ...
1
vote
2answers
42 views

Declaring <?php ?> in variables [closed]

I need to put the PHP <?php global $' . $icon_var . '; echo $' . $icon_var . '; ?> inside the variable of a custom menu structure, but it gets commented: <a href="http://slembas.esy.es/">...
0
votes
0answers
16 views

How to keep state of custom menu?

<div class="menu-main-container"> <ul id="menu-main" class="menu"> <li id="menu-item-1"> <a href="/category-a/">Category A</a> <ul class="sub-menu"> ...
4
votes
1answer
241 views

Add class to top level menu item if it has multiple child levels

I have a WP nav menu, and I need to add a class to any top-level <li> if that item has more than one level of child items (meaning, its child submenu has a submenu too). Like this: <ul> ...
3
votes
1answer
39 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. ...