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
2answers
3k views

styling wp_nav_menu - horizontal, sub-menu drop downs

live site. I'm using wp_nav_menu called "blog-nav". It's displaying ok, however I'd like to have it horizontally oriented and with sub-menu drop downs(all lower cased items should be in the drop down ...
0
votes
0answers
43 views

How to add a menu to wp admin area?

I'm looking for a way to add a menu to wordpress admin area,so admin can publish and edit posts on a specific category through this menu(just like POSTS menu we already have inside wp admin). This ...
1
vote
2answers
2k views

WordPress get or set active menu class

How to get active menu class in wordpress, I want to get it in one plugin to change menu style. Just to clear, I do not want active menu element class. <ul id="menu-scroll" class="nav-menu"> ...
0
votes
0answers
45 views

WordPress Menu Targeting

Okay so I'm building out a plugin that generates a list from the $menu and possibly $submenu. I want to loop through that array and generate that list by the menu_slug, but I cannot seem to figure out ...
2
votes
1answer
4k views

Add class to active element and its parent in nav menu

I am using the following code in order to add a class name "active" to the current menu item: add_filter('nav_menu_css_class', 'add_active_class', 10, 2 ); function add_active_class($classes, $item) ...
-1
votes
1answer
78 views

How To Conditionally Change Menu In Same Theme Location

Is it possible to change to a different menu using conditional tags but using the same theme location? I have 2 menu's created which I want to display conditionally in the same them location which is ...
0
votes
2answers
2k views

Show children (sub-navigation) of active menu item only

So I've searched the net and attempted to code a custom walker class that will do this, but I'm new to WordPress and although similar questions exist none fit exactly what I'm looking for, or suggest ...
3
votes
1answer
344 views

Make Theme automatically choose default nav menu

I have been developing a WordPress theme. I want to be able to, once activated, look to see if there is already a menu created in the backend. If it exists then choose it and use as the primary menu, ...
0
votes
1answer
63 views

Add Protocol to Custom Menus

I've been using tel: links in Custom Menus combined with Responsive Design to add a "Call Now" button to my themes for smartphones. It's been working well. A client just asked me to also add a "Send ...
0
votes
1answer
326 views

Plugin admin list pages as submenu

I am creating a plugin for a custom admin menu based in the admin area. My wordpress template is consisted of 5 pages with different templates and some custom variables that the end user would be ...
0
votes
2answers
351 views

Hide page link in main menu from anonymous users

The title pretty much explains itself, I'm looking for a way/plugin to hide the menu link to a specific page from users that aren't logged in.
3
votes
2answers
159 views

How does a minimal menu walker look like?

According to the docs of wp_nav_menu we can specify our own walker function. They suggest to copy the default one and modify it as needed. But to be honest, it is a bit too complicated for the to ...
0
votes
0answers
232 views

Additional class for.sub-menu UL?

This code returns my WordPress menu: <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'header-menu') ); ?> What's the easiest (non-JS) way of adding additional ...
0
votes
2answers
263 views

Use another menu when logged in

Before the update to WP 3.6 I could add this code in the header.php of the theme, which made it possible to have another menu when logged in: <?php if( is_user_logged_in() ) { ...
0
votes
1answer
117 views

Wp Nav Menu div containers

Hi I'm wanting to create a custom navigation menu that will require creating div containers to hold the SUB-MENU set. In other words I want to do this: <ul class="left_menu"> <li ...
0
votes
1answer
51 views

Active menu also for single array

For our (new) website I figured out how to make menu's active. The only problem is that I want multiple pages, singles and categories under one active menu (just to remind people in what section they ...
0
votes
1answer
1k views

Use WordPresss menus with anchors

I have a CPT archive page and I want to create a navigation menu which will jump to anchors in the form <a name="post-slug" http="{the permalink goes here}>The CPT Title</a> I have been ...
0
votes
2answers
81 views

How can template identify what page it's being used on?

I have a template that is used for many different sections of my site (About, News, etc.). The nav bar needs to show a little graphic arrow below the section you're in. I was passing this via the ...
0
votes
0answers
166 views

load wp_menu dynamically with enquire.js

I'm trying to dynamically load the wp_menu with enquire.js but it just doesn't work. If the screen is < 1080px the wp_menu(mobile) should be loaded, otherwise the wp_menu(desktop). In my ...
0
votes
2answers
1k views

items_wrap not working

I registered a wordpress menu this way: function nothing_register_menus() { register_nav_menu('header-menu',__( 'Header Menu' )); } add_action( 'init', 'nothing_register_menus' ); I am calling ...
0
votes
2answers
340 views

Remove/Hide a Widget on a Custom Template

i want to make a custom template using Genesis.. I added a custom Menu just by adding a widget on WIDGETS section and placed it on the top right side of the page. But i want it to be removed in a ...
0
votes
1answer
523 views

How to get Menu Navigation Labels to output HTML

I'm trying to follow Jason Bradley's advice on how to style my Wordpress menus. Specifically, I want to insert an icon before my navigation items using Font-Awesome. I tried putting this code in the ...
0
votes
2answers
171 views

Display pictures instead of text in menus

I am working on a custom theme. In that theme, I am creating a menu called "social" for links to the social sites, such as twitter, facebook, ...etc. Now, Instead of text, I would like to display ...
0
votes
1answer
25 views

Menu administration, how to allow special charachters

I'm new to wordpress, i have created a website, for multilanguage solution i use qTranslation, my menus has also description and this is a problem, how can i allow special charcters here: Here is ...
0
votes
2answers
62 views

Hide a menu on posts

Is it possible to not have a menu on post pages. I think it would be something like "if page show menu, if post don't show menu" but I'm not sure how to put that into PHP. Thanks
3
votes
1answer
181 views

How can i change menu link when page content empty?

I have a menu with parent and child. I created menu from admin panel using Appearance >> Menus with selecting page. But some of my parent pages content empty so i want to set link(null) when page ...
0
votes
1answer
35 views

How to avoid website url appending problem in wp site?

On localhost when I opens my site (Ex: http://example.com) and when I select any navigation menu then the url of my selected navigation menu appends the previous url. some what like this ...
0
votes
3answers
49 views

How to rapidly create a dummy menu?

I want to create a dummy menu with 1 or 2 level of depth. I know I can create the menu via the administration module, but I want to know if there is something I can use to generate fast a dummy menu. ...
1
vote
1answer
59 views

How to modify wp-includes without messing my wordpress installation?

I'm using a Twenty Twelve theme with a child theme. When the screen is shrunk to less than a certain width a responsive menu is toggled. The problem is that this menu's top level pages look the same ...
0
votes
1answer
74 views

Retrieving a list of menu items in an array

I am currently am working on a custom theme. In this theme, I have a menu that I registered using register-nav-menu, and then I am displaying the menu to my web page using the wp_nav_menu function. ...
-1
votes
1answer
182 views

Custom navigation / menu output (walker?)

I'm trying to implement a responsive jQuery navigation but I need to extend the default output of the WP menu. I believe I need to use a custom walker but honestly, I don't know how to get it to work ...
0
votes
1answer
141 views

How to make a page to not appear in the menu when created?

When one creates a page in the Dashboard (Pages -> Create new) it always appears in the menu and that is the way it should be. But now I want to create a page that does not appear in the menu at ...
0
votes
0answers
327 views

Drag and drop isn't working while creating menu

I am creating a new site , in order to create menu , I just need to Drag and drop the item , in order to create exact menu position and sub menu . But Drag and drop isn't working . Thats why I am ...
-1
votes
1answer
96 views

Create custom page and custom menu

I'm trying to do one custom menu at my wordpress admin panel. My plans are: make and menu, to add some contents at a custom page, like "people" and their names, etc... I wanna make it with php. I ...
1
vote
1answer
262 views

How to make this menu drop down or like accordion

I am using sitesmile auction theme. Here is my working site. In home page there is a sidebar saying "Browse by Categories". I want to make this menu as drop down or like accordion. Whenever the user ...
0
votes
1answer
98 views

how to check if given page is active page

I am building my own custom menu for custom post type. I have a loop and I need to know if given item is active one. How to this properly? How to compare if given items address (slug, permalink, id ...
0
votes
1answer
39 views

Add pages content to startpage through custom menu

I would like to be able to add page content onto the startpage (index.php). But only the pages that i've added in custom menu, and in that order too. I've been searching for a while now, but can't ...
1
vote
1answer
1k 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
87 views

Get first menu item of custom menu

Let's assume the client builds a custom menu with 3 menu items and I'd like to show a few posts, then the first menu item, then some more posts, the second menu item, more posts and then the third ...
1
vote
1answer
147 views

How use %like% in sql statement wordpress

i use a like %text% statement in wordpress: SELECT * FROM location WHERE name LIKE "%on" OR name LIKE "%on%" i tried anything but it's not run: $wpdb->get_results($wpdb -> prepare("SELECT ...
0
votes
2answers
93 views

Rename menu items for All except super admin

I can rename wp-admin menu items But How Can I active it for all users except Super Admin ? add_filter('gettext', 'rename_admin_menu_items'); add_filter('ngettext', 'rename_admin_menu_items'); ...
0
votes
1answer
122 views

add_menu_page does not render the expected result

I'm trying to accomplish the simple task of adding a new page to the admin area but it seems that I just cannot wrap my mind around this simple function. Via codex, this is how I'm trying to add the ...
0
votes
1answer
201 views

Custom post type in submenu with custom meta box as a title with custom html

I am trying to create a menu in wordpress using a custom post type as the main menu item at the top level and all of its childs are going to be included from the posts i create inside it. The html i ...
0
votes
2answers
128 views

remove menu items if user can't read

I want to create one menu for all users and then hide / remove items from the menu if they don't have access to the page the link leads to. This to me seem like an SOP. I really don't understand how ...
2
votes
1answer
353 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 ...
0
votes
0answers
48 views

How to handle change the appearance of 'categories' box on dashboard?

I have a site with hundreds of categories, and when I come to edit some menu on wp-admin/nav-menus.php it is really difficult, because in the categories box there a few pages, with something like 20 ...
0
votes
0answers
52 views

CPT Archive with parent page

Is it possible to set a parent page to a CPT Archive? I used a plugin to add archives to the nav_menu section. That works. But I also want the link to be /parent/archive. Is there a plugin or ...
0
votes
2answers
827 views

Limit top level menu items on wp_nav_menu

I've got a situation where I need to limit the top level menu items on a custom menu. The design only has room for 4 fixed width items, and I want to future proof it from displaying more. Looking at ...
0
votes
1answer
100 views

Menu item not created on theme activation

On theme activation the following code doesn't create my menu with the 'New Page' item, the menu is created and the location is assigned to 'submenu' but no menu item of my newly created page? What ...
0
votes
0answers
52 views

How do I add a link to the menu that has a charector (?) in it?

I'm trying to add a link to a drop-down menu but it gets lopped off every time. THe full address is https://www.ub-tonlinebank.com/onlineserv/HB/Login.cgi?runmode=REGISTRATION but is stops at ? and ...