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
88 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 ...
1
vote
2answers
84 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 ...
0
votes
0answers
57 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 ); ...
67
votes
4answers
74k views

Menu items description? Custom Walker for wp_nav_menu()

Normal Wordpress Menu looks like: Home | Blog | About us | Contact But I've seen many pages with descriptions under these links: Home Page | Our Blogs | About us | ...
0
votes
0answers
47 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)...
4
votes
1answer
332 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> ...
1
vote
2answers
44 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
70 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
1k views

Get WP Navigation Menu from REST API V2

I'm trying to get the navigation menu from JSON response using WP REST API v2 plugin. There is no navigation menu plugin extension for the REST API v2, but only for V1. From codex WordPress Post ...
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"> ...
1
vote
0answers
29 views

Menu items suddenly are displayed all over the page [closed]

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
93 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 ...
1
vote
0answers
53 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
22 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
21 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
31 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
15 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
22 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
43 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 class="...
1
vote
1answer
307 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
74 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
15 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
79 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
1answer
20 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 mydomain/...
1
vote
0answers
18 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: ...
2
votes
2answers
2k views

Assign Menus to Theme Locations with theme activation

A site is using "child1" named child theme. When this site switches to other child theme named "child2", their widgets are moving too but theme locations are not moving. How can i auto assign menus to ...
1
vote
0answers
29 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 http://www....
1
vote
1answer
33 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
0answers
54 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 ...
0
votes
0answers
60 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 button/...
1
vote
0answers
92 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); foreach($...
1
vote
0answers
28 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
14 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
0answers
61 views

Issues adding icon(s) to menu items

I am trying to add icons as additional items in the menu. So for example, it should look output as follows: Home | About | Blog | Contact | ICON | ICON | ICON I installed the Menu Icons plugin ...
0
votes
1answer
20 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( ...
1
vote
0answers
42 views

CSS_Menu_Walker not showing on mobile view?

I found this example on perishable press. My menu works fine and all the submenu items display properly. For some reason, when scaled below 769px, it disappears. I figure it's CSS, but I can't make ...
0
votes
0answers
296 views

Best practice for blank top level menu item?

I create a LOT of WP sites and therefore tons of menus. A lot of times there is no sensible page for a top level menu item. For instance I was creating a site with internal learning. The top level ...
0
votes
1answer
35 views

Show post titles within Wordpress bootstrap Dropdown menu

I created custom bootstrap navwalker class for my wordpress theme all things work correctly i has this code below within function start_el(){} When i put <h2>Hellow World!</h2> within $...
0
votes
1answer
68 views

`start_el` depth argument in custom nav walker always evaluates to zero

I have a custom nav walker I'm trying to use to output only the first level of a menu: <?php wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'depth' => 1, 'walker' =>...
0
votes
0answers
37 views

Custom Post Type category nav isn't highlighting active category

I used Types from wp-types to create my custom post type. I have category archive pages and individual post pages set up. The category navigation is highlighting the active category like it's supposed ...
1
vote
1answer
69 views

Programmatically set current-menu-item using wp_nav_menu

I'm calling wp_nav_menu programmatically on a class and I'd like to be able to set the field that will be shown as the current-menu-item but I don't see an argument for that. It seems like I may be ...
0
votes
0answers
8 views

Why does <li class=“default-menu”> appear? I'm trying to remove a generic link called navigation on my main menu

I really didn't know where else to turn to. It really seems like major overkill to have to manually set class=default-menu to display:none and twice as much ditto to build a filter on functions.php ...
0
votes
2answers
420 views

wp_nav_menu add class to child item with sub child

I need your help, am trying to add class dropdown-submenu to a <li> element which has children. Not sure if I was clear enough, so here is an example: |-Home (Parent Item) |-Services (...
1
vote
1answer
59 views

Get number of root elements in walker class

I extended Walker_Nav_Menu class as below class YPE_custom_navwalker extends Walker_Nav_Menu{} I want use the get_number_of_root_elements( $elements ) function that place in to Walker class within ...
0
votes
1answer
71 views

Adding custom fields to Wordpress nav menus

I'm added new custom checkbox field to the nav menu items. the check box added without any problem when i check it it's work but when i want uncheck it not work and stay in checked state. the code ...
-2
votes
2answers
145 views

Hamburger Navigation Menu

I have a Wordpress menu that I am using as a Hamburger menu for smaller mobile devices. Since there really isn't a "hover" event for touch devices, I have changed the main menu items to show their ...
0
votes
0answers
35 views

Issue in adapted Twentyfourteen-child Functions.js (add toggles)

I am trying to add one (and maybe more) toggle buttons and menus on a Twentyfourteen-child theme. As the behaviour of search toggle is defined in twentyfourteen/js/functions.js I copied and adapted ...
1
vote
1answer
44 views

Where am I doing wrong in my theme menu?

Every thing works fine out of WordPress but the theme's dropdown menu doesn't work. Here is my functions.php code : register_nav_menus(array( 'primary' => esc_html__('Primary', 'codeha'), ));...
0
votes
0answers
63 views

Admin Custom Menu Editor Disappeared

The custom menu editor on my site has disappeared. It used to be under the Appearance menu. Any idea where to find it, or how to fix this problem?I have registered and init the menu properly in theme ...