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 (4)

0
votes
1answer
12 views

How to get the title of root li element

I want to get all info of top level menu from childrens <li class="l-nav-item dropdown"><button class="open-icon visible-xs fa fa-angle-down"></button><a href=" ...
0
votes
0answers
24 views

Add a sidebar for menu item?

I want to modify the WordPress navigation menu. I have added a custom checkbox in the menu items custommenu. If that is enabled, then I want to remove the submenu items for that item and include a ...
0
votes
1answer
11 views

How to make a single Menu Item call another Mega Menu for Custom Post Types and Custom Taxonomies?

I'm trying to build a hierarchical directory using custom post types and custom taxonomies as I've described in another question. My problem is that I cannot figure out how to make those posts ...
1
vote
1answer
22 views

Edit menu item title from edit page/post

After we save a post/page, a new menu item is created (with the same title) in the navigation that we have created in nav-menus.php. If we need to change the menu item title, we need to go to ...
0
votes
0answers
11 views

How to combine multiple custom menus into shorter code

I am working on a plugin that I have on the WP repository and I would love if someone could help "optimise" this code I have for some custom menus. Currently, there is 3 locations of which I pretty ...
0
votes
0answers
15 views

How to populate a nav-menus meta box with admin menu items

I have successfully added a new meta box to the Appearance->Menus (/wp-admin/nav-menus.php) page called "Admin Pages". Now I need to populate it the same way the standard "Pages" meta box is, but ...
-1
votes
0answers
9 views

Change menu's hover color on other page

I'm having problems looking for the code on changing the navigation bar's hover color of my page. Actually in my homepage the colors are what its suppose to be, but when you go to other pages like the ...
0
votes
0answers
11 views

Separate page for news articles - exclusion from 'Blog' page

I'm trying to accomplish the following: have a 'Blog' page, which displays all posts EXCEPT those from the 'News' category, and display the posts from 'News' somehow separately, so that the ...
0
votes
0answers
34 views

Switch vs if else [migrated]

I use if else for custom menus in Wordpress, to load various location menus based on parent page. The agency I work for is adding countless amounts of cities, and it's getting out of hand. One thing I ...
0
votes
1answer
19 views

If test for “has_nav_menu()” does not return echo when no menu exists

I have a strange issue with my if/else test for "has_nav_menu()" I have three menu locations in the template and each is tested if a menu exist in the defined location. However this example below does ...
1
vote
1answer
12 views

Show different different menu in theme_location depending on x

I would like to display a different menu in the same theme_location depending on some condition. I'm wondering if this is possible and if so how? I would like to avoid registering an additional ...
0
votes
1answer
27 views

Change header menu login-logout without changing main menu

I'm trying to change the header menu, such that it looks different when it is logged in and logged out, without changing the main menu. function my_wp_nav_menu_args( $args = '' ) { if( ...
0
votes
1answer
14 views

New Menu Item Type Meta Box

I have a project I am working on where I need to pull in articles from a 3rd party API. I've got this working using rewrites, but the last step I'm having trouble with is integration into the ...
0
votes
0answers
10 views

How to get a different mobile menu than desktop menu in the twentytwelve child theme

I would like to use a different menu for my mobile website than my desktop website. With different I mean the content not the layout. I just want to use the mobile menu of the twentytwelve theme. ...
0
votes
0answers
7 views

How can I remove navigation menu tree on every page? [closed]

This has been bothering me for awhile. Is there a way I can remove the page tree (Home > foo > bar) that shows up on every page on my website? It isn't useful for my site and is just clutter. See the ...
1
vote
3answers
40 views

Benefits of using Nav Walker?

Are there any benefits to using a nav walker class over iterating through wp_get_nav_menu_items()? Nav walkers seem very clunky to me and iterating over an array feels easier and more re-usable but ...
1
vote
1answer
25 views

Multiple navigation menus to a location?

I want to be able to assign multiple menu's to 1 navigation location. But when I want to assign the second navigation, the previous is unassigned. How would it be possible without breaking the ...
0
votes
1answer
19 views

wp_nav_menu work in functions.php but not in the theme

I use wp_nav_menu with this code in functions.php: register_nav_menus( array( 'sidebar_menu' => 'Sidebar menu', 'topmenu' => 'topmenu', ) ); $args = array( 'theme_location' => ...
0
votes
1answer
8 views

Mobile navigation is shown, but standard navigation does not disappear

I have setup that website berlin-permanent-makeup.de and the mobile navigation kicks in, as soon as the screen is smaller than 800 px wide. So far, so good. My problem is, the standard navigation ...
2
votes
0answers
57 views

Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar

I have 8 custom post types (which are actually for 8 different blogs and used as "blog landing pages"). Each custom post type is also a Blog Category and each has several sub categories to it. For ...
0
votes
1answer
9 views

Main menu gets replaced when second menu is created

I have a menu (main menu) and i call it with <?php wp_nav_menu( $args ); ?>. It works normally, and is set to Primary Location. But when I create another menu, the new one replaces the main ...
0
votes
0answers
15 views

Avoid changing menu query with suppress_filters => false

I recently had to change qTranslate for qTranslate X since the former is not being updated. This broke my menu and after searching I found it was because qTranslate X sets suppress_filters to false. ...
0
votes
0answers
20 views

How to identify the current page in a custom wordpress navigation menu code

I am building a custom navigation menu in WordPress, where I have 2 level of depth; parent and direct child sub items. Some items are leaf though. I want all parent items to have no url so that I can ...
0
votes
1answer
15 views

Why does my site show the correct front-page when you arrive at the site, but not when you click 'home'?

I have a website (derbyskillbuild.org.uk) and the 'home' button leads to a diffent page than the 'front-page': When you arrive at my website, it displays the correct front-page.php with the loop on ...
0
votes
1answer
26 views

How to register a menu based on a ACF condition

I am trying to register a Wordpress menu, depending on a ACF field condition. $logo = get_field('logo','options'); if ($logo) { register_nav_menus(array( 'brand_centered_left' => __('Brand ...
2
votes
1answer
25 views

jQuery cookie not working properly in wordpress

I make my own accordion menu with html + jquery its working perfectly to forth level, then i add a cookie code from net and do some extra work it also work 100% perfectly in html. My complete HTML + ...
0
votes
0answers
9 views

how to get Tag in menu populated with recent posts submenus

I would like to know if it would be possible to implement an option to "populate" each tag menu items of my WordPress site automatically with links to recent post as submenus. In other words, when ...
0
votes
0answers
18 views

How can I show latest posts from certain tags menu items as submenu?

I have the following order of menu in the menu dashboard: Category1 ->tags(related to category1) category2 ->tags(related to category2) etc.. when you hover a tag menu item I want to get the list of ...
0
votes
0answers
9 views

hide some nav menu items to non-localhost visitors, based on ip?

For a work extranet website i have a website that's fully accessible on premises. The website is now also fully accessible from outside as well. There are however some level 1 nav items with sub menu ...
0
votes
0answers
16 views

How to create a mega menu with latest posts of certain categories per tag?

I have the following menu: -Category1 ----tag1 ----tag2 ----tag3 -category2 ----tag1 ----tag2 ----tag3 etc.. The category1,2,.. are empty placeholders to hold the submenu tags. Could someone ...
0
votes
0answers
8 views

How to work around the bug which prevents custom menus from being deleted?

A bug makes it impossible to delete a custom menu in the expected way: select menu, click Delete Menu. This has never worked for me on any WP site in any version of WP; it produces an Error 403 and ...
0
votes
1answer
17 views

Always show wordpress submenu on responsive header menu

I'm trying to edit my CSS to always show all the li tags inside my header menu, also with ul.sub-menu li; I just want to show all the items from the menu, but I'm working on it for hours and I've ...
0
votes
0answers
6 views

How to duplicate Sub Menu?

Just wondering how I can duplicate (copy) a sub menu item. I have the duplicate menu and duplicate post plugins. Neither lets me duplicate a sub menu. Thank you for the help
0
votes
0answers
12 views

Customize Theme Screen Keeps Reloading

I have a theme that I have customized, and when I go Appearance > Themes > Customize the page keeps reloading, over, and over, and over... This is the only page that does this. I have tried ...
0
votes
0answers
16 views

How to echo text from higher level of nav

I'm building a site with three levels of nav. Primary is your standard nav in the header of the page. Second level of nav is below that primary header. Tertiary level of nav is on the sidebar. In ...
0
votes
0answers
12 views

Page Categories in Admin Menu

I am developing a responsive wordpress theme, among other things I will be serving different content to each device so with this in mind I am trying to organise the wp admin menu to make it easy to ...
0
votes
2answers
17 views

different Menu position showing same menu

Weird Problem: I registered two menus (theme-positions) and then added two different menus to each (in Wordpress Admin), but it always shows same menu in both positions: sidebar.php <?php ...
0
votes
1answer
32 views

Specific Page that convert Hyperlink to anchor in nav menu

I extended my Walker_Nav_Menu that converting hyperlink to anchor as I'm making one page website. Here is the code: class description_walker extends Walker_Nav_Menu{ function start_el(&$output, ...
0
votes
1answer
19 views

Missunderstanding of Wordpress menus

I made my first Wordpress plugin and I have couple questions regarding menus. When I activate default Wordpress theme "Twenty Fourteen" I can see navigation menu on top of page. My plugin, upon ...
0
votes
1answer
26 views

Using Different wp_nav_menu theme_location based on page id (or a parent id)

I am sure this has been asked. It's new territory for me so I don't have the full vocabulary of what I'm doing, nor am I sure this is the right way to do it. I've got a bunch of internal pages on a ...
0
votes
1answer
9 views

WordPress menus - automatically generate

I want to automatically generate some menu items using a script (i.e. using wp_update_nav_menu_item). This would usually be a one-off event but I might want to repeat it if the menu items need ...
0
votes
0answers
18 views

Add separated section like zurb foundation to wp_nav_menu

I have menu that separating with special section devider. Please, see screenshot to understand what am I talking about: Here is the html of this menu: <ul class="menu"> <li><a ...
0
votes
1answer
24 views

Display Menu Navigation Label

How to get Navigation Label as should be of the menu I'm using this code <?php $locations = get_registered_nav_menus(); $menus = wp_get_nav_menus(); $menu_locations = ...
0
votes
0answers
11 views

How to add scripts or attributes into wp_nav_menu?

This is my original list Menu which inlude the scripts. <li> <a href="/" data-start="color: rgba(255, 255, 255, 1);" data-300="color: rgba(160, 199, 52, 1); ">Home ...
-1
votes
0answers
11 views

How to display wp_nav_menu horizontally?

may u know how to display the wp_nav_menu horizontally? <?php wp_nav_menu( array( 'theme_location' => 'Header' ,'container' => '',) ); ?> What i get is like a normal list and i ...
0
votes
0answers
9 views

How to tag posts under menu items without showing posts titles?

right to the point. How do I 'link' posts to menu titles so once someone clicks on the menu title all the posts that I tagged there show up? I do not want that each post's title show up (when ...
0
votes
1answer
55 views

How to add schema.org SiteNavigationElement and property URL to navbar?

I would like to add the schema.org SiteNavigationElement and the relative url property to the links of the navbar. I have the following: <nav class="navbar navbar-default navbar-fixed-top" ...
0
votes
2answers
27 views

How to make an anchored page in a navigation menu tab

In my header navigation, I would like a menu tab to direct the user to open a page and directly take them to an anchored point in that page. Does any one know how I can accomplish this in WordPress? ...
0
votes
1answer
27 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
44 views

Add a page to nav-menus.php in admin area

I am developing a plugin which extends the function of menu locations in wordpress. I now need to have a page to configure the settings. The only codes I could find on google were to add a themes page ...