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
0answers
61 views

How to get the count for each taxonomy term

I know it is $term[0]->count; However, my terms are placed in the custom menu plugin. My terms are currently structured as Parent Child Parent Child How do I append the term count of each ...
0
votes
0answers
167 views

wp_get_nav_menu_items() returns an empty array under tags archive

I have three nav menus and for some reason under tags archive wp_get_nav_menu_items('MenuName') returns an empty array. Frontpage, posts, pages are OK, but when you go into tags archive, no items ...
0
votes
0answers
195 views

Vertical dropdown menus

I am working on converting an HTML/CSS template to a WP theme on my local machine. I am unable to add vertical drop down sub-menus to the main menu in the theme. The HTML for the menu is: <div ...
-2
votes
1answer
150 views

Is it possible to add a superscript trademark symbol to a menu?

Is it possible to add a superscript trademark symbol to a WordPress menu?
0
votes
2answers
2k 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
42 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 ...
0
votes
0answers
37 views

Add HTML to a specific navigation menu

add_filter('wp_nav_menu_items', 'add_line', 10, 2); function add_line($items, $args) { if ($args->theme_location == 'primary') { // my code here } return $items; } Instead of the above, ...
0
votes
0answers
446 views

wp_nav_menu : Adding a filter to add class to a, anchor element

I want to add a custom class to the <a class="custom"> element that is outputted from wp_nav_menu(). Is it possible to do this? The reason if you're curious: I don't want to use li.menu-item a ...
1
vote
2answers
1k 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
383 views

Use Wordpress Menu as Isotope filter

I am using an Isotope for my Gallery,I want to use a custom menu so I can easily exclude and include categories if I want.. so far I am using a code to retrieve all the categories. $terms = ...
0
votes
0answers
44 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 ...
1
vote
1answer
3k 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) ...
0
votes
1answer
71 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
1k 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
294 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
52 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
284 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
270 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
131 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
151 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
200 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
109 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
50 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
958 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
75 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
121 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
0answers
47 views

How i call multiple template in same menu

I want to call two template in same menu means when i click on tab one then page will open different template and when i click on tab two then page will open in different.I have three template ...
0
votes
2answers
891 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
301 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
410 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
154 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
59 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
137 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
32 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
42 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
50 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
34 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
143 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
121 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
254 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
86 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
232 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
57 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 ...
0
votes
1answer
960 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
70 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
108 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
83 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
117 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 ...