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
1answer
59 views

Create a Page via plugin

My problem is to show a list of products read from db tables. I know how to read them and I am able to produce the table, but only using a shortcode embedded in a page that I've created via WP. I ...
1
vote
1answer
152 views

Using Walker To Add Menu CSS Class Functionality

I'm trying to add the ability to insert Custom CSS Classes to menu items. I believe I do this by extending the walker_nav_menu but I'm not sure how to call the custom classes. This seems like such a ...
1
vote
1answer
48 views

Adding an admin menu page showing the link twice - how to solve this?

I'm newbie and I'm trying to create a plugin to add a menu to left menu in admin section. i have create the page but it is working fine. but i find the left menu being displayed twice. how can I ...
1
vote
1answer
21 views

Recommended method for updating/adding menus when adding new theme

I'm working locally on a completely new theme. Once I'm done I'm going to use the "test drive" plugin to allow admins to test the theme before switching over to it. The problem is that with the new ...
1
vote
1answer
88 views

Add custom menu item type

Is there a way to add custom menu type to the menu editor? I know I can add items dynamically with the wp_get_nav_menu_items filter, but I would like to have the position of those items configurable. ...
1
vote
1answer
158 views

HTML list menu to Wordpress menu

I have purchased an HTML theme that I want to rebuild into Wordpress. I'm having trouble making the menu work. Beneath is the HTML for the menu. (without the beginning and end of the UL). <li ...
1
vote
1answer
309 views

Displaying different page links on different pages

I have a wordpress site with 100+ pages. Now suppose 5 pages are related to page 1, and I want to show them in side bar as similar pages/related pages and other group of pages in other menu in ...
1
vote
1answer
147 views

Set Item Order with wp_nav_menu_{$menu->slug}_items

I have some code that adds a menu item to a menu using wp_nav_menu_{$menu->slug}_items. It's pretty easy to add a menu item as the first or last item of the menu, but I was wondering if there's ...
1
vote
1answer
182 views

list category posts under its item in menu

When adding category to Menu, I need it to list all the item that belong to that category in separate UL automatically. like this http://i.stack.imgur.com/ulOOS.jpg Of course I can do that manually, ...
1
vote
1answer
1k views

Wordpress 3.5 dropdown menu

I'm pretty new with WordPress and I want to create my own dropdown menu without the use of any plugins. I already did some research but there are some things I do not understand. In my header file I ...
1
vote
1answer
241 views

display only the wp_nav_menu, which has the current-menu-item

i have a problem displaying only the menu with wp_nav_menu, in which the current-menu-item is in. Heres what i got: function register_menus() { register_nav_menus( array( 'sidebar-menu' ...
1
vote
1answer
113 views

Main menu highlighting on subpage which is not in submenu but in hierarchy

I have my menu made of images. Therefore I use divs and with .current-menu-item I use CSS to change the image. This works if I'm directly on this main page. If I'm on a subpage I cannot use this trick ...
1
vote
1answer
104 views

pull non-wp site into content area of wordpress -or- pull wp header into non wp site?

I am building a site which has a ecommerce nature that is not able to be tied directly into wordpress. What my goal is to have a constant header that is generated by my wordpress header on all pages ...
1
vote
1answer
151 views

Custom Post Type Nav to Subpage

I've registered a post type for an audio plugin, the post type is "Custom Players" in the admin and has its own tab on the admin sidebar. I'm just curious if there's a simple way to move this out of ...
1
vote
1answer
51 views

cross-site custom menu

i have a multisite whice i want to separate because its unneccery as two of my sites are on the same DATABASE and all i need is actually the dynamic custom menus which i have built in the main site(to ...
1
vote
1answer
103 views

Custom Post type menu highlighted in the archive/post

I created a custom nav menu for my custom post type by custom links (linked to the archive page). Let say I have a custom post type named "product", and when I click on the menu, it will go to the ...
1
vote
1answer
132 views

API for wp menu hacks

Question changed due to new developments! I was loooking for a way to hack the menu items in the custom menu page to add a "hide" checkbox and other options. The only way I found is to override the ...
1
vote
1answer
268 views

custom menu widget where menu title is a link

I am looking for, like the title of this question indicates, a custom menu in wordpress where the menu title itself is a link. It seems like a very simple thing, but after a lot of searching I've come ...
0
votes
1answer
19 views

List all posts from custom post type by taxonomy

Having custom post types with taxonomies. Lets say I have a custom post type "Products" with taxonomies "new", "old", "fashion". Now I have a Nav where I can click on ...
0
votes
1answer
12 views

How to make menu items active based on hash

I'm creating a Wordpress portfolio site using the Simone theme. I have three menu items that link to the same page but with different hashes: tovly.com/work/#work-all-work ...
0
votes
1answer
15 views

How to add scroll IDs to WordPress menu anchors

In my theme the top menu is like this: <nav> <ul> <li> <a class='active' data-scroll-nav='0'>Home</a> </li> <li> ...
0
votes
1answer
26 views

menu item active class for author.php

I am building a custom theme. For the author.php file that displays an author profile with their posts, I would like my 'About' menu item to turn active (get active class). I have tried: ...
0
votes
1answer
18 views

Showing the same menu in multiple location

Today I have faced an weird problem regarding WordPress menus. Here is the register function of my menus - function register_adaptive_menus() { register_nav_menus(array( 'top-menu' => __( 'Top ...
0
votes
1answer
21 views

Sub Menu content is being duplicated

In the plugin I am developing I am using the following code to build my menu - add_menu_page('BCRM Plugin Settings', 'BCRM', 'administrator', __FILE__, 'bcrm_settings_page', BOOGIE__PLUGIN_URL . ...
0
votes
1answer
20 views

Next page link via the custom menu

I would like to display a "next link" at the bottom of several page templates, using the actual custom menu in which they sit in. I built a function that mostly works except for an edge case ...
0
votes
1answer
27 views

Mobile Menu Not Working

The mobile menu stopped working after I updated WP to the latest version, I assume it has to do with a customization of the theme. http://kvintage.com/ Wondering if anyone could please take a quick ...
0
votes
1answer
42 views

Wrap description and sub menu in a wrapper

I am trying to add a wrapper to description and sub-menu in wordpress using walker class, Description will only be shown for the first menu so the structure will look like this EDIT I have been ...
0
votes
1answer
18 views

Menu Structure with Links failure to update

Sorry if this sounds like a newbie question but this is driving me crazy and I can't seem to figure it out. I want to add a link called "About Me" to my Menu that redirects to another website. It ...
0
votes
1answer
13 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
42 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
1answer
25 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 ...
0
votes
1answer
49 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
28 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
40 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 ...
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

Remove nav menu or menu item

I try to remove a nav menu programmatically but I didn't find the way to do it. I knwo how to create it but I don't know how to delete it... I've got the menu name and I wan't to delete it like in wp ...
0
votes
1answer
57 views

How to remove dropdown from wp_nav_menu

I dont want to have dropdown (select - options) in my wordpress menu, even in mobile or lower width devices. I know I can use css to hide it, but I want to remove it at all. I googled for an hour and ...
0
votes
1answer
115 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
1answer
60 views

Add <span> within the <a> output of <? wp_nav_menu() ?>

Currently i am using: <?php echo wp_nav_menu( array( 'menu' => 'main-menu','depth'=> 1,'items_wrap' => '<ul class="navigation_ul">%3$s</ul>' ) ); ?> I want to achieve: ...
0
votes
1answer
16 views

Highlighting Main Navigation Menu With Two or More Class Matches

I believe this doesn't happen very often. I am working on a project in which a child page can show up under several different parent pages. The page actually belongs to just one parent, but in the ...
0
votes
1answer
34 views

Display a tag before the menu list content

Is that possible to insert a text before the menu items? In this case, I want to lead a <h3> tag for the list content (like a menu title). I tried the if/else to recognize that the menu have ...
0
votes
1answer
12 views

List of WordPress menu item indices?

The following code will rename the "Posts" menu item to "Blog Posts" in the WordPress Dashboard: function lc_change_post_menu_label() { global $menu; $menu[5][0] = 'Blog Posts'; } add_action( ...
0
votes
1answer
77 views

Extend walker - navigation, adding data attribute to a tag

I would a data attribute to the a tag in the menu, like have <a href="#example" data-attribute="attribute">CLICK</a> I know that I have to extend the Walker BUT I tried in several times ...
0
votes
1answer
67 views

How to get menu location in wp_update_nav_menu hook

I want to get the menu location in the wp_update_nav_menu (during menu save action) add_action('wp_update_nav_menu', function ($id, $data = NULL) { error_log( var_export($data, true) ); ...
0
votes
1answer
38 views

How to make top level menu think it has a current item

This question has always tripped me up, but it seems like there should be an easy solution. I have created a couple pages in a hierarchy as follows. About Us - History - Mission Events ...
0
votes
1answer
43 views

Horizontal Navigation

Hi. I been fighting with this problem for couple of weeks now. Trying various approaches. From CSS styling to a custom walker. I want to render each level as its own element. The navigation ...
0
votes
1answer
29 views

add_media_page function not creating submenu

I have the following plugin that I'm just testing at the moment. /* Plugin Name: Menu Test Plugin URI: http://codex.wordpress.org/Adding_Administration_Menus Description: Menu Test Author: Codex ...
0
votes
1answer
38 views

Add link at the end of wp_nav_menu

I need to add a conditional menu item such as "/at" or "/de" or "/ch" in the wp_nav_menu. Since the link is conditional (based on the country the website is being viewed), it can't be added from the ...
0
votes
1answer
47 views

How to get current menu item “CSS Classes” value?

While on any given link that has a CSS Classes value, I'd like to do something like this: $css_classes = get_current_menu_item_css_classes(); if ( $css_classes == 'mycustomclass' ) : // do ...
0
votes
1answer
31 views

How can I pass value to function in add_menu_page?

I was use to pass value to function for the below menu. add_menu_page('Competition Manager 2013-2014', '2013-2014', 'manage_options', 'manager_2013_2014', 'manager_2013_2014', plugins_url( ...