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)

1
vote
2answers
25 views

Need Random Category Nav Menu

I have set my category navigation menu to display home and 5 of my categories and their respective posts when the category tab is clicked, as that is all the space there is to display in the menu bar. ...
0
votes
2answers
28 views

jQuery not working when used with wordpress menu

I'm using a starter theme that was provided to me by a friend, and have successfully implemented jQuery several times on the website. I want a background image inside a div to change when the user ...
0
votes
1answer
19 views

How do I remove a menu from a theme?

I have a very simple question, how do I remove a menu from a WordPress site? Is there a plugin out there that can handle this or do I have to go into my theme's code and remove something from there?
0
votes
2answers
323 views

Creating a second menu on Twenty Eleven aligned right from the first

I'm a bit new here. But I did attempt to Google this (etc.), without much luck. Basically, I'm trying to set up a second menu on Twenty Eleven that will line up to the right of the normal one (while ...
0
votes
0answers
20 views

wp_nav_menu list children if on parent page but sibling if on sibling page

For example: About Page (Parent) History Mission & Vision Location If I'm on the About Page, I need the wp_nav_menu to show the three children pages. But if I'm on the History page, I need it ...
0
votes
2answers
443 views

Handling complex multi-level architecture / menu for large site

I am trying to get feedback and ideas for solving an information architecture / content management problem using wordpress. I have a large site ( 1,000+ pages, hundreds of posts ) made up of ...
0
votes
0answers
34 views

How do I add a class to every menu item automatically in a nav menu?

At the moment I'm adding a button element around the menu anchors using this markup: $defaults = array( 'theme_location' => '', 'menu' => 'main-nav', 'container' ...
0
votes
0answers
26 views

How to add <button> to wp menu using bootstrap 3 framework

I need to figure out a way to add a <button></button> element to a link inside of the wp menu I currently have this markup: $defaults = array( 'theme_location' => '', 'menu' ...
0
votes
1answer
26 views

Custom Post Type Link added to menu won't show in frontend

I have created a custom post type and I want to link directly to some of the posts in the custom post type in my main navigation menu. I can see the posts in the left hand side of the menu page, and ...
0
votes
0answers
12 views

Enable “CSS Classes” for menus by default

I'm wondering if it's possible to enable "CSS Classes" for Appearance > Menus by default when a theme (or a plugin) is activated? Like: function my_theme_activate_css_classes_for_menu(){ // What ...
0
votes
0answers
15 views

getting specific items from menu

In trying to build 2 linked menus, lets say the hierarchy is like this (In the menu options) - A -- B -- C -- D -- D1 -- D2 - A1 The first menu I want it to be fixed so I fetched it with ...
0
votes
1answer
47 views

Custom navigation menu with awsAccordion

I'm making a custom template for my client. Well i'm strangling for hours, for making the vertical accordion menu dynamic so my client can change the nav links etc. The structure of the navigation is ...
1
vote
1answer
20 views

Custom Menu url is Empty

I added a new menu using this code: wp_update_nav_menu_item($menu->term_id, 0, array( 'menu-item-title' => 'Custom menu', 'menu-item-url' => 'http://mylink.com', ...
0
votes
1answer
1k views

Active class to current link

How do I add the active class to the current link that the user is viewing? I have a mixture of pages and custom post types in my main nav menu and I know that wordpress has .current_page_item that ...
3
votes
1answer
1k views

Using a menu walker add a custom item at the end of the menu's items

I need to add a search field at the end of a menu in a list item. I've been looking at walkers but finding it really hard to figure out what is the last item (or even get the total). Also where would ...
0
votes
1answer
318 views

JS this.href not getting link from menu item

I have a script to fade in and out the page container when a link is clicked in the nav. I have attached the script to the .menu-item class to target just wordpress menu links. The script itself seems ...
0
votes
1answer
7 views

menu_class showing up on DIV instead of UL

I was having an issue where my menu was being created using: wp_nav_menu(array('theme_location' => 'main_menu', 'menu_class' => 'sf-menu'')) The resulting HTML was like this: <div ...
0
votes
1answer
31 views

Add a Submenu from Another Submenu in a Custom Theme

Good day everyone! I would like some help from you since I'm just a beginner in WordPress. I would like to add a submenu under another submenu like this: International China Independent Group ...
0
votes
0answers
21 views

Nav Walker: Set ul id to current item's title

I'm trying to assign an ID to a sub-menu ul that matches the associated items li in my nav-walker. Here's the output I'm looking for: <ul> <li> <a href="menu-item-1" ...
0
votes
1answer
22 views

Editor access to menu: custom post type missing

I have used this code; $roleObject = get_role( 'editor' ); if (!$roleObject->has_cap( 'edit_theme_options' ) ) { $roleObject->add_cap( 'edit_theme_options' ); } to add menu access for ...
5
votes
4answers
2k views

Making breadcrumb with wp_nav_menu

I was looking for a quick and dirty method to output a breadcrumb navigation on a WP site, without requiring the installation of a plugin and also leveraging the built-in WP menu. Here's what I came ...
0
votes
0answers
12 views

Custom Link Not Registered as Nav Menu Parent

My issue is that I have a horizontal menu, with a few hashed - '#' - custom menu links to prevent users from going to empty pages (the main categories were just made pages for the link structure). ...
0
votes
2answers
25 views

Is It Possible To A Link To The Homepage From The Admin Sidebar?

The closest I've managed to get is: function redirect_to_local_110(){ wp_redirect("/", 302); exit; } function add_home_link() { add_menu_page( 'Course', 'Course', 'read', 'home', ...
0
votes
0answers
22 views

Showing just the menu toggle next to logo in twenty fourteen

For mobile, I want to eliminate the black menu bar, search box/icon and move the menu toggle up so that on mobile, my site just has the logo and the menu toggle. This gives a bit more room for ...
0
votes
1answer
43 views

Replace Menu Item with Logged in username

I have a topnav menu item that current says "My Account", I would like to change it so that it functions as: Welcome [Logged in Username] -> My Account -> Logout
2
votes
4answers
287 views

How to stop mobile theme inheriting desktop navigation menu?

UPDATE************ Well I have a working solution, although not ideal. Using the Genesis sandbox child theme which has a mobile nav button built-in, I was able to set that to use the primary nav ...
0
votes
0answers
23 views

Add class to menu

I want to add a css class in menu list with this code: function my_special_nav_class( $classes, $item ) { if ( has_nav_menu( 'socialmedia' ) ) { $classes[] = 'btn-social btn-outline ...
0
votes
1answer
39 views

How do you manage large menu hierarchies in WP?

Has anyone worked on sites where the menu hierarchies is fairly large? Not more than 3 levels deep, but more than 40+ menu items? If you only list first level items in the top menu without dropdowns ...
0
votes
1answer
88 views

WordPress 3.9 two menus in same position?

I have a new WordPress theme and I want to add extra menu, but as WordPress 3.9 allows only one menu to add in one position/places in theme? How can I add two menus in one position? I purchased the ...
0
votes
1answer
25 views

Where is the order of a menu saved in the database

I want to use a custom menu from the wordpress database but I get the elements disordered and I want them to have the same order how can i do that? There is a place in the database where the order is ...
0
votes
1answer
158 views

Add “Logout” link to navigation menu

How can I add a link to the primary navigation menu with the class="right" attribute? I tried to add a static link to example.com/wp-logout.php?action=logout but that leads to a logout confirmation ...
0
votes
1answer
76 views

WordPress filter to hook into menu <li> items and add a custom attribute

I have a WordPress template (I'm using Foundation as a base and https://github.com/olefredrik/foundationpress/ as a starter theme) I'm trying to build and I can't seem to figure out how to hook into ...
0
votes
0answers
15 views

Custom generated WordPress menu using get_pages renders the proper HTML but doesn't display all elements

I have created a menu with the hopes of listing all of the child and grandchild pages of a page (see link below) it works great except that it is cutting off the menu at about 15 children pages, most ...
1
vote
2answers
61 views

Menu styling for last menu item

okay so I'm using the following code to get my links... <?php wp_nav_menu( array('theme_location' => 'primary', 'container' => '', 'menu_class' => 'mainnav') ); ?> This is my CSS for ...
0
votes
1answer
17 views

add custom classes to anchore in wp_nav_menu

i wana add custom class to anchores in wp_nav_menu outputs. default for example is : <li id="menu-item" class="menu-item menu-item-type-custom"> <a ...
0
votes
1answer
41 views

How to make pages metabox display all hierarchy in menu admin?

Running WP 3.9.1 I've got lots of pages and sub pages. When I get to create menu lots of sub pages doesn't display on the right level, but some do? This is how the pages metabox is displayed The ...
-1
votes
1answer
21 views

Why plugin's icon for the menu not found?

Why plugin's icon is not showing in plugin menu ? All code of plugin : add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( 'Site ...
0
votes
1answer
29 views

Give a condition to a wordpress menu item to change its offerid for each landing page I create

So my wordpress site has a one header and one footer with a big CTA as one of the menu items. I want to create a bunch of landing pages but I want to be able to change the offerid in the url for each ...
7
votes
3answers
20k views

How make top level menu item not have link, but have sub-menus that are linked?

I'm building a horizontal menu and some of the entries on that menu will have dropdowns (sub-menus), and some won't. Those that have sub-menus are not actually pages. They're just meant to be guides ...
0
votes
1answer
14 views

Showing a link with Javascript based on log-in status

<?php if ( is_user_logged_in() ) { echo ''; } else { echo '<a onclick="ppOpen('#login_panel', '800',1)" href=\"javascript:\">Entrar</a>'; } ?> Hello, I'm trying to make this work ...
0
votes
1answer
40 views

Show menu only if_page is

I have created 4 menus (submenus) in wordpress. I need to know how show this menus only if pages ids are "10 and 11 for example. Is possible? I'm desperated after two hours... thanks! This is my code ...
0
votes
0answers
38 views

Twenty Eleven child theme anchor top menu not clickable

I am working on child twentyeleven theme. I have to do three things to my child theme. 1-Using page.php coping in my child theme.I added the code in page.php at top of the code <?php if ...
1
vote
2answers
552 views

How can I automatically add child pages to pages in a WP menu?

In the WP menu creation GUI there's the Automatically add top level pages option. I would like to do the opposite, for any page that is in the menu, automatically add it's child pages. Is there a way ...
0
votes
2answers
2k views

Add section (add_settings_section) to a custom page (add_submenu_page)

I have a plugin page created with add_submenu_page. I want to add a new section there but nothing happens: add_submenu_page('parent', 'Foo', 'Foo', 'manage_options', 'foo-settings', ...
0
votes
0answers
130 views

How to add “data-toggle” to wp_bootstrap_navwalker?

I'm writing one pager for my client. I made Child Theme from Twenty Thirteen. All is made on Bootstrap 3.2.0. I use tabs, accordion. And i also want to use jQuery Smooth Scroll plugin. Unfortunately ...
0
votes
0answers
29 views

Walker Nav Menu - down arrow for top level, but right arrow for below

I'm using Donald Harvey's solution with Custom Walker_Nav_Menu to show an arrow where submenu items belongs. It worked for me in a project where I had a left sidebar vertical menu. But when I'm ...
5
votes
4answers
11k views

How to get current-menu-item title as variable?

Is possible to get current-menu-item as a php variable? I'm listing the category museums via the menu item 'museums we support' so i'd like the get 'museums we support' bit and display it somewhere? ...
0
votes
0answers
25 views

Backend menu that shows pages with specific page template and their child pages

I've set up a menu in the backend that shows a list of pages that have a specific page template assigned to them. I've managed to do this using the code below, but I also want to display the child ...
6
votes
1answer
2k views

Custom ID for certain menu item?

I'm displaying Wordpress menu using this function: wp_nav_menu( $args ); Menu is set in wp-admin/nav-menus.php. Can I somehow attach ID of my choice to one of the items? I want the menu to look ...
0
votes
0answers
18 views

Alter menu item parent relationships with walker?

An example custom menu structure I would like users to see About Interests - Movies - Toys - Fun Job Hangouts The end result outputted menu ready for dropdownage would be About - Interests - ...