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

WP nav menu + Bootstrap, add role=“menu” to UL

For one of my projects I'm trying to add a nav_menu to my WP theme. It should work as a quick menu (sidebar). The only problem remaining: How do I add a role="menu" to the < ul >? <?php ...
0
votes
0answers
45 views

Ubermenu cant handle my menu, how to deal with large number of menuitems?

I have a webpage with a large number of pages, around 250-300, and I output these in Ubermenu at the moment. Needles to say, my menu backend is very slow, and sorting is a pain in the.. well you know. ...
0
votes
1answer
234 views

How to display list of child pages with parent in wordpress?

I have following format of sub-pages in WordPress: About Us -Services -Products -Surgery I want to list all sub-pages with parent page like above but the code that I am using from ...
2
votes
3answers
1k views

Add Javascript to Wordpress Menu

Is there a way to put javascript in the URL portion of a Wordpress menu item? I have a live chat function on my site, and I am supposed to put this code onto the site to make a link to open the live ...
0
votes
1answer
35 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
95 views

Insert a div class inside wordpress menu

<ul id="menu"> <li><a href="#">About Assetline</a> <li><a href="#">Products & Services</a> <div id="mega"> ...
0
votes
0answers
54 views

How to add a code for lastpostdate after/inside a specific menu link?

So, I have a news website. The designers want me to have a link in the menu that says "Latest News - [time of the last post]". I know I can get the datetime of the latest post with ...
0
votes
0answers
103 views

Wordpress Shortcode in Menu Item Title

I've looked and have not found anything that works. I am trying to include a shortcode in a menu item's 'Navigation Label'. Basically Iwould like to have a dynamic title displaying the user's name ...
0
votes
2answers
28 views

Query for menus in backend (BE)

I want to create a simple plugin (already started) to have in one place recurring tasks (for me as webdesigner) e.g. take site offline, set backend icon, don't show updates and so on... Now I want to ...
1
vote
1answer
80 views

How to remove admin main menu name repetition

I have added an admin menu using add_menu_page. When there is a sub menu with add_submenu_page, The main menu name is repeating. How to remove this repeating menu ? This is my code ...
1
vote
0answers
40 views

Insert menus in the database

I want to create a large menu structure, and the admin pages time out, so I cannot insert them via the admin screens. How can I insert the menu entries directly in the database? Thank you
0
votes
1answer
433 views

Create search form in menu as in Twenty Fourteen theme

I would like to replicate the search form in Twenty Fourteen's menu. I have tried to hide and show the search button with jQuery. My Problem is that the button is not sliding from left to right and ...
0
votes
0answers
48 views

Extending the walker class to add a top level list item to the nav menu in a different order

I've seen functions to append to the beginning or the end of the menu, but how do I add this list item right after the first? So it would come second in the menu order. Is this possible? If so, how ...
2
votes
1answer
68 views

Creating a menu page in a Object Oriented developed plugin

I am trying for the first time to build a plugin for Wordpress following OOP way. I am having some problems while trying to create a submenu page using add_users_page() function. Here is a simple ...
0
votes
0answers
32 views

Sub 'Page' Child Menu Order

I cannot seem to get the order of my sub-page Menu items in the correct order. They will only display in alpha or numerical order - even if I specify the menu order. To be clear - I am not referring ...
0
votes
1answer
13 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
0answers
30 views

menu hierarchy not working

I have created a theme from scratch and was using a custom menu with no problem. Somehow, I lost the ability to create a hierarchy in the menu -- all menu items show up at the same level. I have ...
0
votes
0answers
111 views

how to implement the slide and push menu in wordpress

new to this forum & new to wordpress. I have read about Slide and Push menu functionality in http://tympanus.net/codrops/2013/04/17/slide-and-push-menus/ How to implement this on a WordPress ...
0
votes
0answers
63 views

How to add extra items in wp nav menu

I have a menu in wordpress where each menu item has an extra item. For example: I have a "Home" menu item where I have an extra item "come see us", I have an "About Us" menu item where I have an ...
0
votes
0answers
49 views

Why is the Walker_Nav_Menu self closing tags added in start_lvl

I'm creating a custom Walker based on Walker_Nav_Menu for a megamenu I'm working on and the issue I'm having is that it seems the tags I open on start_lvl are being automatically closed. Here's my ...
0
votes
2answers
282 views

Change HTML structure for custom menu in sidebar

I've been digging for documentation on how to change HTML output for the "Custom menu" which you place in optional widget. So its clear what I meen I have attached an image of the widget block here: ...
0
votes
1answer
41 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
0answers
29 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
211 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
17 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
40 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 ...
0
votes
0answers
574 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 ...
6
votes
5answers
349 views

How can I display a menu on certain pages only?

Instead of using sidebar widgets to tell on what page they should be visible, I like to choose at the menu settings to appear on specific pages. Default Wordpress way: So projects is a page and ...
0
votes
0answers
31 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 ...
0
votes
2answers
1k 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 ...
0
votes
1answer
142 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
68 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 ...
8
votes
1answer
1k 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
50 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
2answers
92 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
0answers
61 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
0answers
30 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 ...
0
votes
1answer
20 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
1answer
247 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
0answers
27 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 ...
1
vote
1answer
382 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
87 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
2answers
132 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
427 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
59 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
102 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
61 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
58 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 ...
0
votes
1answer
71 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. ...
1
vote
1answer
99 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 ...