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

How do I add a search box to the nav menu?

I would like to add a search box to the nav menu by appending the following code in functions.php (at the end of the file, but before ?>). add_filter( 'wp_nav_menu_items','add_search_box', 10, 2 ...
0
votes
1answer
24 views

Wordpress functions.php does not affect the theme menus

I am trying to customize my pre bought theme. What i try is, to have different menus for each page without using a plugin. Original theme has a function about navigation which uses walker class. here ...
0
votes
0answers
17 views

Reproduce sub-navigation drop down

We have a navigation bar that when you hover over it there is a drop down on 3 out of the 5 menu items; I'm trying to add the other two. I have added what looks like the right code but I can't figure ...
0
votes
0answers
21 views

How can I achieve this menu structure?

I need two main sections which have subsections. Let's call them "Main section" and "Secondary section" Main section is the main page when users come to my blog, its name is "COSAS QUE HAGO" (THINGS ...
0
votes
1answer
53 views

How to add buddypress sub-menu items to other menus

I want to use BPs sub menu items in other menus. By default you get following items to drop them in menus; Activity Notifications Profile Logout I want to add "Profile -> Edit" to the list. In ...
0
votes
0answers
19 views

Link to specific content

I'm messing around with an existing theme at the moment, trying to strip away as much of the WordPress 'environment' as possible to only preserve the text-editing functionality. So, essentially, I ...
0
votes
0answers
12 views

Thumbnails in my album pages

I'm going to insert a navigation bar (with thumbnails) in my album pages. I've tried in different ways, but no one is working. The code, for "template-album" source, is the following. <?php ...
0
votes
0answers
36 views

Add custom dynamic attributes to menu items

Hello I would like to add a data-hover attribute to each element in a specific Wordpress menu. I found the following on the codex. However I don't know how to call each specific nav item to have the ...
0
votes
1answer
23 views

Frontside menu based on custom roles logged in permission

I have two phases to my site, the first is menu, i want my site to hide (normal) menu items if the user isn't logged in e.g when someone visit my site, the menu should be Home About us Products ...
2
votes
1answer
136 views

Custom Walker anchor tag not inheriting attributes

So I am just now learning and playing with custom walkers and I came across this really helpful Stack Overflow question. So I implemented the answer in that answer and added this to my functions.php ...
0
votes
1answer
27 views

How to make menu output links absolute

The page and post links added to WordPress menus are relative in nature. I need a way to force them to be absolute without using the "Custom Link" option. Is there some function or maybe a modifier ...
0
votes
1answer
148 views

Custom nav walker with different output depending on depth

I am trying to redevelop a HTML site as a Wordpress theme, and the HTML menu is as follows: <ul> <li class="current"><a href="#"><div>Home</div></a></li> ...
3
votes
1answer
80 views

How to call “page specific menu items” in template

I have installed a plugin for giving custom command for menu to display on each Page Specific Menu Items, now I need to display these menus on theme header. Can I use anything like wp_nav_menu(). ...
0
votes
1answer
42 views

Vertical Menu items shifting to same line when window size increased [closed]

I've tried messing with float and clear but could get anything to keep this from happening: "Fun" and "Shop" are supposed to be on different lines. Here's the CSS involved with the nav/ul/li/a: ...
0
votes
2answers
83 views

Making menu link open in new tab?

I'm trying to add a top level menu to the left sidebar of the WordPress admin panel. Here's the code I currently have: add_action( 'admin_menu', 'linked_url' ); function linked_url() { ...
1
vote
0answers
35 views

Change submenu markup

I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own. The problem with this is that I would like to change the markup of the submenu and ...
0
votes
1answer
48 views

Current author archive in navigation menu

I want logged-in user see her/his own author archive page link in top navigation menu,say (a link to a list of all her/his posts). What I achieved so far is this: function my_nav_menu_author_link( ...
0
votes
1answer
65 views

How to dynamically alter all the links in menu via function.php

I have been searching and reading for 3 hours and still couldn't find anything that come close to what I needed and I am still trying understand how wp add_filter, rewrite, etc works. Just started ...
0
votes
0answers
11 views

Wordpress API menu theme location assign doesen't work for second+ item

I'm trying to create 2 menus, one main menu and a footer menu. The script below creates the menus and assigns the pages but it cannot assign the second menu and onwards to the theme menu location. It ...
1
vote
1answer
47 views

How to add programmatically all pages and children to backend menu

I have a big website with tons of content, and I would like to automatically add all pages and their children to the menu in the backend, so I can then rearrange them easily via drag and drop. I ...
0
votes
0answers
28 views

Render a Wordpress menu from outside Wordpress?

I would like to render a menu in another system outside wordpress using SQL to fetch the menu contents and some logic to build the actual menu. I turned on mysql logging to see what wordpress was ...
0
votes
0answers
20 views

Walker Menu with Parent, Children, Children

This website has the menu I have been working on I used the suggestions from a question that was posted about a walker menu and it really helped and the site no longer crashers and the menu ...
0
votes
1answer
19 views

URL links consistent with menus?

I'd like to have a URL links consistent with menus on the page. For example: Menu1: Submenu1 item1 item2 Submenu2 item3 item4 Menu2: Submenu... etc.. The corresponding links ...
0
votes
1answer
109 views

Mark menu item as current-menu-item for category

I have some categories on my WP website. When users sees this categories and posts from them i want to mark one of menu items as active. How can i set one of my menu items to have class ...
0
votes
1answer
18 views

Custom location for menu

Does anyone know why when I the code to implement the menu it displays the menu right after the body tag. And this is where I add my code <div class='nav'> <a href='#' ...
0
votes
0answers
31 views

Create a Wordpress menu with accordions elements

I need help to create a menu with the accordions elements. I use Visual Composer to create an accordion and creates elements with random ID's, it's possible to create a menu with links to open each ...
0
votes
2answers
51 views

How do I display entries in the top menu based on conditions selected in the sidebar menu?

Hi. I don't know ajax programming. I know HTML, CSS, little bit of php(so much that I am editing and customizing all the default themes, and learning along the way). I have attached the UI of the ...
0
votes
0answers
22 views

How to make btn nav work with secondary menu: wordpress header

I'm very noob with code but somehow (lol) I was able to change a secondary menu to a btn which I expect to open and close on click but I have not been able to make them (btn and nav) work together. ...
0
votes
1answer
62 views

How do I hook into the container of wp_nav_menu?

I know I can edit the items within the wp_nav_menu by declaring a custom walker, but I want to add some code just inside the container, which isn't handled by a walker. It's in ...
1
vote
1answer
158 views

Add itemprop Schema.org Markup to li Elements in wp_nav_menu

I currently call menus with a basic wp_nav_menu code: <?php wp_nav_menu( array('theme_location' => 'primary') ); ?> I am trying to find the easiest way to add itemprop="url" to the line ...
0
votes
0answers
41 views

Apply Twenty Fifteen Menu Functionality to a Secondary Menu

I'd like to apply the same dynamic, category-to-subcategory dropdown menu that's used in WordPress's Twenty Fifteen theme to a new secondary menu that I've registered in a different WordPress theme ...
-1
votes
0answers
34 views

Menu not working properly with left click

I am working on a single scrolling page site and the navigation. The menu works fine for navigating to different areas of the current page. however there are 2 links to pages on on the same site and ...
0
votes
0answers
17 views

geting a string containing all the url's of the main menu

I write a simple plugin. Inside it I need to get a string containing all the url's of the main menu(and submenu) items. On the run time, the code doesn't know any details on the main menu of the site. ...
0
votes
1answer
33 views

wp_nav_menu_items for one menu

I tested this tutorial. It works great. The problem is that in the tutorial there is one menu while I have 2 menus. Let me know how I can customize this function for the feature only applies to ...
0
votes
0answers
16 views

SQL query to load a menu and contents [duplicate]

I would like to render a menu in another system outside wordpress using SQL to fetch the menu contents. I'm able to find a menu item based on the slug: SELECT * FROM `wp_terms` wt WHERE wt.slug = ...
0
votes
0answers
32 views

Rewrite url from /page to /custom/page

I have a situation where I need some custom routes in my Wordpress set up. In my menu, there is an 'about us' item (which I set as a custom link) but it is not clickable, and just has 2 sub items in ...
1
vote
1answer
47 views

Prepend to start of WordPress nav loop

I am trying to add some markup before the <ul> tag of a WordPress menu using a custom Walker, which extends Walker_Nav_Menu, however I can't get any of my custom markup displaying on the ...
0
votes
0answers
30 views

Add custom taxonomy archive (not a term) to menu

Is it possible in Wordpress to add a taxonomy (not one of its terms) to a menu? I havea taxonomy called "downloads" which contains some terms like "pdf", "psd", etc. I want to add the "downloads" ...
0
votes
0answers
13 views

Multiple menu overriding

I have two menu, next to each other but when i wp_nav_menu() my first menu broke down, as its dependent on jquery. Am i missing something in my code> function register_my_menu() { ...
0
votes
1answer
72 views

Reveal hidden submenus on page load - Twenty Fifteen theme

How can I reveal hidden submenus on the page load in the Twenty Fifteen theme? I would like it so that all the submenus are open on every page. Can someone please guide me on how this can be achieved? ...
0
votes
1answer
56 views

Strange menu behaviour wordpress admin [duplicate]

I am able to get logged into my site, but when I hover over some of the menu options, the links behave in an odd manner and some of the link text disappears etc, some of them sit on top of each other: ...
0
votes
0answers
27 views

Scrolling feature in top menu drop down

I am creating a site with wordpress having six primary menu options and out of the six, two have 26 sub options under them. As the number of options in the drop downs are more than what my PC screen ...
0
votes
1answer
272 views

How to get current page menu item name instead of full menu item list

I would like to build a menu structure where you can only see the menu item of the current page like on this web site http://www.bigspaceship.com/services/ I search around and I have the following ...
0
votes
1answer
23 views

Wordpress menu and plugin installation problem

Am I the only one who is getting this problem or is the problem in wordpress new version. Please someone clarify. The version is wordpress-4.2.4
2
votes
1answer
134 views

Add a logout menu link [duplicate]

How can I add a logout link in my websites menu? Is there a PHP code or link that I can use to be able to do this? Thanks
1
vote
3answers
241 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
1answer
66 views

How can i display custom menu in sidebar?

I would like to display a custom menu in a custom sidebar instead of author information or blank space i.e custom menu with similar styles as default menu but only in vertical manner as displayed in ...
-2
votes
1answer
30 views

how can i get the page_ID in nav li [closed]

I need a menu with the page IDs of the linked Pages in the li Tags. It should look like that: <ul id="menu"> <li class="pageid_23"><a href="page1">Page 1</a></li> ...
0
votes
1answer
36 views

Admin: sub menu doesnt display under apperance when activate my themes

I got a strange issue in WordPress. I build a themes for WordPress. when I activate my theme, some sub-menu under appearance in admin panel where missing. If I activate another themes it works ...
0
votes
0answers
22 views

How to separate a nav with child levels into full length menus?

I am using the wordpress underscores theme taken from https://github.com/automattic/_s I have tried to use a custom walker but am getting confused with it. All I want to do is create a list of links ...