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)

1
vote
3answers
100 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
21 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 ...
0
votes
1answer
32 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
32 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
6 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
11 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: ...
0
votes
1answer
17 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
18 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 { ...
-2
votes
0answers
12 views

No hover on sub-menu, but click instead

I am at my first experience with Wordpress, installed and configured here, and, surprisingly, not knowing JavaScript and PHP, I have a problem. I'd like to view the sub-menus clicking on the parent ...
0
votes
1answer
34 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
23 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
13 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
20 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
17 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
24 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
14 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 ...
0
votes
0answers
26 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
36 views

Declaring <?php ?> in variables

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 ...
-4
votes
0answers
19 views

I want to remove Banner Image in WooCommerce [on hold]

I want to remove the banner image from the Sub Menu Pages in WooCoomerce as you can see from the screenshot below there is an Image I would like to remove from every Sub Menu Page.
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
46 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> ...
2
votes
0answers
11 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. ...
1
vote
0answers
23 views

Menu items suddenly are displayed all over the page [on hold]

Strange things are happening :( When you take a look at the site: www.handelbijvanandel.nl you will see that all menu- and submenu items are shown on the page. At first I didn't pay much attention to ...
1
vote
0answers
9 views

Main Menu and Sub Menu Items for Footer

So I'm currently trying to figure out how to display both my main menu items and my submenu items separately in my footer. I want to display them both in separate columns (bootstrap) and am having ...
-2
votes
0answers
16 views

Menu pigeonholes, what are the most graceful options available?

I have, a site that is presently implemented as HTML documents and other assets under an Apache DocumentRoot. The collection includes several megs of text, source code not included. I am in the ...
1
vote
0answers
18 views

WordPress Quick Question . How to Get Parent Link in Submenu in My Code

I'm creating a menu walker from foundation 6 but problem is parent link is not click able, so solution might be that if we can get parent link in submenu but have some problem because I'm don't know ...
1
vote
1answer
12 views

How to override the theme home page?

I'm using a theme that has it's own home page layout but I want to use a normal page instead. I can't find a way to change it because in Settings> Reading, the home page is already set to 'Home' (a ...
1
vote
0answers
19 views

'Pages' widget alternative for custom post types?

I want to make a menu from hierarchical custom post type. There is a default WordPress widget called 'Pages' that give you list of all the pages preserving their hierarchy. Is the a way to use this ...
1
vote
0answers
22 views

custom walker class

I'm trying to make a navigation that has a similar structure of this website: https://grannys.ca/ But I got struck in the logic of how can I implement an if statements which determine several things: ...
1
vote
0answers
12 views

Menus don't work after 4.4

After I updated to Wordpress 4.4, I noticed that the menu links on the front page of my website don’t work anymore. The website is: http://rantaboutfilm.com/ the theme is: swagger When the user ...
1
vote
0answers
16 views

Sub menu indicator that links to sub menu

I am trying to create a custom mobile menu for my wordpress site. I have looked around the net for an answer and found similar things or different ways that I can accomplish this but not in the way ...
1
vote
0answers
25 views

Custom navigation structure with walker class

I'm trying to make the navigation with different structures using walker class but I got stuck. Here's the code of what should the html output <nav class="main-nav"> <div ...
1
vote
1answer
48 views

add span class and i tag inside wp_nav_menu link anchor tag

I found examples adding a class to top level items, so we can display an arrow in menu items with sub-items, but is seems terrible to cope with the already built in WordPress classes, can't display ...
1
vote
0answers
22 views

Uber menu, manual integration, disable Mobile

i use uber menu plugin for my theme. my theme (pointfinder) require manual integration code.It works perfectly, but I would turn it off completely on the mobile I used the following form (if else)to ...
1
vote
1answer
13 views

Different fields available for different sites when when customising Menu's

I have 2x websites, both running identical versions of the same theme, yet when I try to customise the menu's I'm met with different field options. On Site A I am able to add settings to fields such ...
1
vote
1answer
33 views

get_query_var('post_type') not returning in a filter

Trying to highlight custom taxonomy pages in the main nav, so I am trying to get the post_type of the current rendered page (to compare to the menu item): add_filter('nav_menu_css_class', ...
1
vote
1answer
14 views

Hide sub menus sometimes

I have the following css: nav ul ul { display: none; } It hides sub-menus for me. It works too well. I'd like the sub-menu to be visible iff the parent menu item is the parent of the selected ...
1
vote
2answers
24 views

How to add a parameter to <a> links in the nav menu?

I have to add itemprop="url" to the links of the links in the navbar of this site. In the settings I found the function wp_nav_menu(). Even after reading the WP codex, I am not able to make the ...
1
vote
0answers
14 views

Creating a menu containing categories and authors

I'm looking for a way to make a menu that contains all categories and when an author has 1 or more post in said category they appear in the dropdown for that category, the links could look like this: ...
1
vote
1answer
17 views

category permalinks

i am quite confused about the permalink stuff. So here is whats up... I have a page called tours as well as custom post type called mc_tours. At first i just changed page permalink to ...
1
vote
1answer
28 views

Add dynamic Sitemap to footer

I'm trying to create a footer menu/sitemap of sorts in Wordpress. (It's also worth a mention this is my fist attempt at anything Wordpress/PHP related. Context: I've hosted it here for the time ...
1
vote
0answers
12 views

Responsive menu gone on wordpress Responsive theme

The responsive menu on my website is gone (homepage only). I am not sure what caused that and don't know how to fix it. Can you please help? I will really appreciate it. The website is ...
1
vote
0answers
26 views

Create menu / submenu from category subcategory and posts

I have a custom menu made up of pages and categories and I am trying to output the category and subcategories as well as the last 4 posts from each category/ subcategory. In trying to use a walker ...
1
vote
1answer
14 views

I am facing a problem with the navigation menu of my website

The link to my website is http://ashevilleandbeyond.com/ and when you load it on your browser, for a few initial loading seconds, you will notice that the menu items are visible at the top left side ...
1
vote
1answer
16 views

How to line up sub-menus?

I'm pretty comfortable using CSS - and I have a child theme (from evolve). I've tried a little bit of everything, but I can't seem to get my sub-menus to line up directly underneath the parent menu ...
0
votes
0answers
30 views

Add each Wordpress menu item into individual Bootstrap column

So basically what I'm trying to do is create a custom menu that has icons the user can add/edit. Each menu item has two pieces to it, the top has an icon and then the base has the name of the ...
1
vote
0answers
21 views

Custom Loop through category menu to include sub categories

In my custom wordpress theme I currently have the below loop to the main categories <?php $menu = wp_get_nav_menu_object('navigation'); $items = wp_get_nav_menu_items($menu->term_id); ...
1
vote
0answers
12 views

Categories as main menu items and subcategories as nested lists

I am new to WordPress and am trying to make my website. Would it be possible to list categories and subcategories as a nested list with links in the main navigation menu. What am i trying to achieve ...
1
vote
0answers
13 views

Navigation doesn't render when wp is hosted

I have created a theme on my local host and it works fine. I am using the walker function in order to get the bootstrap navigation. However when I upload the site on godaddy the navigation doesn't ...
0
votes
1answer
10 views

Calling wordpress menu outside ignores custom menu item

I have a wordpress website and I want to use wordpress menu outside the installation. So I created a file called nav.php and put the following code include( '../wp-load.php' ); wp_nav_menu( ...