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)

7
votes
1answer
417 views

Mega Menu Walker

I'm trying to create a mega menu walker. Unfortunately, walkers completely escape my coding knowledge. I could really use some help getting it working. Here's the features I need: Wrap the ...
0
votes
1answer
22 views

How to Emulate Default Navigation Menu Behaviour in a Custom Theme?

I'm trying my hand at developing a custom theme, and I've got navigation menus working (with the help of this walker, but only if they're explicitly defined in the menu settings. The default themes ...
0
votes
1answer
833 views

Add id to menu items in wp_nav_menu

I'm using wp_nav_menu in Wordpress to create my navigation The output is similar to this(I have removed href links) <nav id="pageNav"> <ul id="menu-headernav" class="menu"> ...
0
votes
1answer
162 views

Responsive menu on genesis theme [closed]

Hi I'm customizing a Genesis framework theme Jane and I want to change the menu to be responsive with Twitter Bootstrap. I already found an question how to override the genesis_do_subnav function ...
0
votes
0answers
14 views

Wordpress custom url menu items being overwritten

I am fairly new to Wordpress development. Using a site that runs 3.91 with a custom theme that I have inherited from someone else. My question is fairly simple: I want to add custom menu items that ...
1
vote
1answer
170 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
0
votes
0answers
10 views

check_admin_referer always false when I use on add_action('load-'* hook

I have try to add hook on load my plugin page. But every time i save my config, it always return "Are you sure want to ..." message. Is there something i missed? Here's my code: <?php class ...
0
votes
1answer
29 views

Output menu title

Is it possible to output the title of wp_nav_menu somehow? The closest I could find was http://codex.wordpress.org/Function_Reference/wp_nav_menu#Adding_a_Word_at_the_Beginning_of_the_Menu. For the ...
1
vote
1answer
258 views

Change menu with language?

My problem is that I have used a plugin called polylang and now it doesnät work with another more importent plugin so I need to find a solution. I use WPML on other sites and that is not an option ...
2
votes
1answer
4k views

How show sub menu only using wp_nav_menu()

I am using this code to show the custom menu subpages if you are on the parent page. But what this code also shows is a parent page on a page that has no sub menu, which I would like hidden. Basically ...
0
votes
0answers
75 views

wordpress mega menu without plugin

I created a mega menu on my site using wordpress native wp_menu. I wanted to display 4 columns in each mega menu. each column contains 5 links you can see it live here (it's in hebrew but check the ...
1
vote
1answer
323 views

Menu Custom link - using relative link when WP is in a subdirectory

I tend to develop sites in a subdirectory, and I tend to use a fair amount of custom links in my menu ( the "Custom Links" option in the WP admin Appearance > Menus section) to display archive pages. ...
0
votes
0answers
9 views

Drop Up Menu with a twist

I am trying to make menu tabs slide up like a bookmark on hover so that the main menu item is still on top and the submenu slides up with it. I am using TwentyTwelve WordPress theme. Is this possible ...
1
vote
1answer
71 views

Hide menu item in certain condition

I'm using the plugin qTranslate and I have to hide one menu item when the language isn't Italian. Searching online I created this solutionand applied the solution in this post I created the file ...
0
votes
1answer
97 views

How can I remove data-target=“#” from bootstrap dropdown menu?

I've created a mega menu with wordpress. The theme I'm working with happened to use bootstrap and adds so much weird stuff to my menu, and one of those things that seem pretty weird is that it has ...
2
votes
1answer
718 views

Pulling Featured Images in to a WordPress Menu

I've got a simple static list marked up like this that I'd like to turn in to a WordPress Menu: <ul> <li><a href="#"><img ...
0
votes
0answers
30 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
37 views

Pagination doesn't work on multiple categories

I have the following problem. In my custom menu (wp_nav_menu) I added a category. This category uses the template category.php. Now I have multiple categories that are shown on the page. My problem is ...
0
votes
2answers
32 views

add dynamic ID for wp_nav_menu after and before

I have menu like this: <ul> <li> <div class="buttons-4" title="some_title"> <a href="[some_url]">[something]</a> ...
0
votes
1answer
15 views

WP_NAV_MENU filter targets all menus

Im trying to replace my template's primary menu through a plugin so that I don't have to make changes to the header.php. I found this code in another question answered here in 2011 (Replacing ...
0
votes
0answers
30 views

If menu has submenu, add parent as first child

I am using CSS framework (Metro UI, but this is a problem in Bootstrap too). When I set parent menu, the item itself isn't clickable, it's only toggle for its submenu. I tried to change JS and CSS so ...
0
votes
1answer
656 views

Add posts from a category to menu with all posts in it as sub menu

Because there is no category option on pages I desided to add post category to main nav. I added the category and added posts on it but it doesn't dsplays the sub category on menu. what should I do to ...
0
votes
1answer
16 views

Hook on creating a menu entry?

I need to run some code after a new item has been inserted into a WordPress nav menu. Is there any hook on menu modification or something similar?
0
votes
0answers
23 views

Disappearing items in menu

I have problem with disappearing items in menu. I added php_value max_input_vars 7000 php_value suhosin.post.max_vars 7000 php_value suhosin.request.max_vars 7000 to my .htaccess but it doesn't ...
1
vote
0answers
24 views

Weird behaviour on Edit Menus screen

I am running WP 3.9.1. Fresh install. ACF and Gravity Forms are the only two plugins running. Perhaps someone had this issue before... On the edit menu screen I have a tab called "View All" where I ...
2
votes
1answer
55 views

Adding Post Counts to Menu (Nav) Programmatically?

I'm fairly stumped on this. Without getting too query-heavy, I was wondering what path one might take to produce a menu that links to a category of posts, and displays in parenthesis how many new ...
0
votes
2answers
18k views

How to Create a Custom WordPress Navigation Menu with the Code?

Without using plugins, how to create a custom WordPress navigation menu with the code? I have Wordpress ver 3.2.1 and Buddypress ver 1.5.1 I would like to create a menu. I would like to place the ...
0
votes
1answer
60 views

Making a Custom Menu Sidebar Icon show as Current in css [closed]

In the custom WP Menu I have assigned classes which are different for each menu item. For example .power-icon a { padding-left: 35px !important; background-image: url(/images/icon-grey.png); ...
1
vote
3answers
88 views

multisite: global menu containing network site links?

Can I create one single menu that appears on every page within the network and contains every site and page that exists within the network? I'm talking about the following structure: Main Site ...
0
votes
1answer
26 views

I can't add more pages to menu - menu delete pages

Two days ago I decided to add three more pages to the menu on my site. I already had like 140 pages in the menu, so this is something I know how to do. But I hadn't done it in some months, so maybe ...
0
votes
0answers
38 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 ...
0
votes
1answer
40 views

Theme modification for custom category menus

My goal is to have a custom menu in the header based on the category of the post being viewed. I'm setting up a single wordpress site that will contain about a half dozen different categories. ...
0
votes
1answer
23 views

How can I get an array/list of all current WordPress Admin Menu items?

I would like to somehow retrieve a list of all current admin menu items, even the ones created by themes/plugins. Is it possible?
1
vote
1answer
70 views

how to put the logo in the center of other items in the navigation bar

I'm developing a website in wordpress and I have to create a navigation bar in which the logo of the website has to be put between items like this: item1 item2 LOGO item3 item4 I'm thinking to use ...
0
votes
1answer
28 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
2answers
1k views

How to use wp_category_checklist()?

I've recently discovered that we can insert a dropdown list of categories like this: <?php define( 'WP_USE_THEMES', false ); require( './wp-load.php' ); ?> <?php ...
0
votes
1answer
49 views

Confused about the correct functioning on Wordpress Menus

good evening, Im been having some kind of problem with a specific, and as far as I can see, simple WP project, specifically with how to use the wp_nav_menu function, normally, when I try to create a ...
0
votes
0answers
19 views

How to programmatically add login form to wp_nav_menu X position

I have a menu I created in WP that registers 'main_nav' so the user can still use the Appearance > Menus screen to edit their menu. However I need to add the login form to the 4th (main) menu items ...
3
votes
3answers
4k views

Menu limit, cannot add new menu items

I'm running WP 3.4.2 on a VPS. When I first moved to this VPS server and imported all my WP data from the old, the menus worked fine. However, for some reason, I cannot edit/add to the menus, and some ...
1
vote
1answer
33 views

Which settings/options are saved on a theme-basis and how does this affect theme-switching?

I realized that when switching the theme (in my case to a child theme) some things don't stay the same: Widgets Menus At least this is what I found out so far: Widgets Don't lose widgets when ...
3
votes
1answer
57 views

How can I add (custom) modules to Appearance -> Menus?

Does anyone now how I can add (custom) modules to Appearance -> Menus? (Or has a link with explanation on how to do this) So that when people change their menu in the backend they can choose what to ...
0
votes
3answers
2k views

get menu id using its name

I have a menu name Social Network. I want to get the menus ID. I tried the following, but didn't succeed. global $wpdb; $menu_slug = 'social-network'; $menu_id = $wpdb->get_results( " ...
7
votes
4answers
11k views

Remove wrapping div and ul from output of wp_nav_menu

I am using the new menu system of Wordpress, and here is the result of wp_nav_menu() <div class="menu-main-menu-container"> <ul id="menu-main-menu" class="menu"> <li ...
1
vote
1answer
31 views

wp_nav_menu add some element to container

I've tried to hook wp_nav_menu_args to get an ID for the nav menu. I tried to add an element using javascript to container menu. But I never get the ID for the menu. How can I add an element to a nav ...
0
votes
0answers
39 views

Get the menu name or location of current menu item

I am having a hard time trying to get the name of the active menu and, apparently, I cannot find any solutions to this issue. Basically, I have several menus that follow this pattern: Menu Name ...
0
votes
1answer
21 views

Retrieve Menu name for nav_menu_item

Given a nav_menu_item object, how would I determine the name of the Menu it is associated with? I have a couple menus defined in my theme, as well as, a nav_menu_css_class filter. Inside the filter, ...
0
votes
0answers
17 views

How to display counter for post in navigation?

I have custom post type called Booking. It have custom post status : "waiting confirmation" and "confirmed". I want to display counter in navigation menu to count total post which status is "waiting ...
0
votes
1answer
23 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 ...
1
vote
2answers
61 views

Wordpress Split Menu

I'm coding my first WordPress Theme and trying to solve this problem: On the desktop version of the website I’d like to split the menu into 2 sections. One would appear on the left of the logo and ...
0
votes
1answer
36 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 ...