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
1k views

Ways to give a wp_list_pages menu link specific class names?

I'm looking to style my wp_list_pages with a span class. I'd like to give it a unique class so that I can give each a specific icon. 'link_before' => '<span ...
0
votes
1answer
67 views

Some doubts about WordPress handle the horizontal main menu visualization

I am pretty new in WP (I came from Joomla) and I have some doubt regarding how WordPress handles the main menu (I mean the horizontal menu in the header). As example I use this online test website: ...
0
votes
1answer
86 views

Why in this WordPress theme I can't see the Main Menu?

I am pretty new in WP (I came from Joomla) and I have the following problem. I have installed WordPress on my server and if I use one of the included theme (such as the Twenty Thirteen theme) when I ...
0
votes
1answer
78 views

Unable to add extra elements to the main navi (wp_nav_menu_items)

I'm trying to get the list of authors to automatically appear on the main navi (without having to manually add them one by one as they are created). So far I added this on my functions.php, but no ...
0
votes
2answers
93 views

wp_nav_menu inside an object — how do I deal with fallback_cb?

I'm trying to create a class that allows me to generate a navigation menu. Here's a simplified version of what I'm using: class PJ_Menu { function make_menu() { $args = array( ...
0
votes
1answer
165 views

Appearance > Menus > Left Sidebar > Add Toggle

How can i add my own toggle here ? There are toggles for each post type but I would like to add this without creating a new post type. Where should I start looking ? Let say I wish to add something ...
0
votes
1answer
203 views

Show login greeting above sub-menu links?

I'm using WordPress' built-in menu system to output my Main Menu Structure. I have one sub-menu, and it has two links currently, "Tracking" and "To-Do List". I want the following login greeting to ...
0
votes
1answer
235 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
1answer
33 views

Question about Menus on Wordpress

I have a question regarding something that is not working properly, I have a menu that is not working, currently with my theme I have 10 menus, one being the main nav and the rest are needed for ...
0
votes
1answer
144 views

Parent Page > Child Page Menu

I am trying to create a collapsible menu using Bootstrap. The problem I am having is getting the correct Wordpress PHP code to call the right pages. Also this menu will be displayed on these child ...
0
votes
1answer
49 views

How to conditionally add a wp_filter

I have a WP filter I created that I only want to run on certain menu items. I am attempting to use - function add_nav_class($output) { $output= preg_replace('/<a/', '<a class="lsbb"', ...
0
votes
2answers
76 views

Change appearance based on category but post is in two main categories

I want to change header and menu based on what category a post is listed in. I could duplicate the post and assigned each of the two categories separately but this sounds messy and bleh. The post/s ...
0
votes
1answer
24 views

Opening Menu link in another tab

I am adding a link to my Menu: Everything is working correctly except I would like the link to open in another tab and can't figure out how to. How would I do this?
0
votes
1answer
93 views

Menu link to all posts (all categories included)

In WordPress how can I add a menu link to an archive for Posts? I can see that I can add category archive links but what if I want to have an archive of all the posts (therefore including all ...
0
votes
1answer
146 views

How to create a complete mulilanguage site using xili language plugin?

I am using xili language plugin for create a multi language site. Using this i can create posts and pages on different languages. But when i switch to other language the menus doesn't converted to ...
0
votes
1answer
2k views

Active class to current link

How do I add the active class to the current link that the user is viewing? I have a mixture of pages and custom post types in my main nav menu and I know that wordpress has .current_page_item that ...
0
votes
1answer
33 views

Making pages in a menu appear conditionally

How do I make a page (dis)appear conditionally in a menu? I had something like this in mind: if(condition) //show_page_in_menu I would prefer an answer that doesn't incorporate an external ...
0
votes
1answer
603 views

How do I check if a menu exists?

I'm currently retrieving a nav menu based on the parent page's title, and if the page doesn't have a parent then it's own title. global $post; $page_title; if ($post->post_parent) { ...
0
votes
1answer
20 views

Creating custom menu with custom themes

I have created my own custom WordPress theme and am now trying to implement the custom menu. I noticed with the default theme that when I went to Appearance > Menus, I was able to create my menu ...
0
votes
1answer
1k views

How to add class to anchor using wp_nav_menu

Sorry if my post duplicate but i can't find best solution for my problem. I'm newbie on develop WP theme. Now i'd like to add class to current li and last li, but i don't know how to do? Hope someone ...
0
votes
1answer
663 views

Modify the output of wp_nav_menu in a very specific way?

I am trying to get wp_nav_menu to output something like this: <div id="topMenu" class="spanningMenu noPrint"> <ul> <li class="topMenuDivider"></li> ...
0
votes
2answers
340 views

wp_nav_menu does not take arguments?

I am sorry for this nooby question, but I just don't get it : I was working with the function reference for wp_nav_menu and this is my line of code: <?php wp_nav_menu( array('theme_location' ...
0
votes
2answers
2k views

How to display the title for each menu item in a span attribute

I'm trying to add a CSS hover effect to my theme's main menu and the effect is based on an attribute passed in a <span> element. The problem is that I am unable to produce this dynamically with ...
0
votes
1answer
164 views

Switching to child theme breaks menu names

When I switch to the child theme I am working on, the main menu uses the page names instead of the names that I gave it in the Appearance > Menu options. Happened to anyone else?
0
votes
1answer
15 views

Expected snippet value not showing

I have a code snippet like this one, <div class="container"> <ul id="menu"> <li> <a> <i ...
0
votes
1answer
27 views

Wordpress always display the first menu

I try to display multiple menus but Wordpress keep always display the first one I created... Here is all the code about the menus: functions.php <?php function custom_init(){ ...
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
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.
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
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
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
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 ...
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
2answers
60 views

wp_nav_menu with WP as pure CMS

I'm trying to use WP as a pure backend CMS for my site. I've got a few pages setup in WP e.g. About, Main Page, Sample Page and I can display the content on my own php pages by using ...
0
votes
1answer
177 views

Wp_list_pages not showing children with custom page template

I seem to be having problems when using custom page templates using wp_list_pages. These pages are always displayed at the bottom of the website in a menu. The problem is, that they should have a ...
0
votes
1answer
38 views

how to set the link in wordpress such that on clicking it doesn't open another page but go to the bottom of same page

I have one word press project and in that index page is having 7 menus like home, about, contact, offering, invitation, evolution and downloads now how to set the this links such that on clicking it ...
0
votes
1answer
249 views

How do I add a menu item to a Pods admin menu?

I'm writing a plugin that will send a notification message to an external queue whenever a menu item is clicked. This function is related to some customized data structures I made using the Pods ...
0
votes
1answer
613 views

CSS Classes (optional) on menu is not showing

As you know, there are input boxes for CSS Classes (optional) on each menus. But it's not showing (coming out) in source. Is there any function for disable for CSS Classes (optional)? I need to find ...
0
votes
1answer
132 views

Simple form to add custom links to menu?

I currently have a menu set up called "sidebar links" with 5 custom URLs. In my widgets section I have a Custom Menu which shows my "sidebar links" menu. This basically gives my sidebar 5 links. ...
0
votes
1answer
113 views

Why Isn't My WP_Nav_Menu returning false?

I'm using wp_nav_menu for a submenu that I only want to display (including the surrounding html) when there are sub-menu items to display. The problem is, the function is always returning with either ...
0
votes
1answer
163 views

Generating wordpress menu - cant understand the config

I created html template based on bootstrap css and am trying to create wordpress theme from it now. Created my own menu function for it, which basically just sets default config for wp_nav_menu ...
0
votes
1answer
713 views

How to check if current page is a parent item or child item in a given menu

I'm trying to build a submenu into my theme, and I've got it working except it shows even on top-level pages that don't have children. How could I check that the current page (or current menu item) ...
0
votes
1answer
97 views

custom walker class for own menu?

i have designed a html template for own blog, in my theme my menu is this structure, <ul class="right"> <li class="has-dropdown"> <a class="active" href="index.html">Home</a> ...
0
votes
2answers
1k views

Add “drop-down arrow” for menu items with sub-menus

WordPress doesn't add parent class to menu items that have submenus. Therefore this is required to extend this: function add_parent_css( $classes, $item ) { global $have_children; if( ...
0
votes
2answers
130 views

Adding a tag to wp_nav_menu

I am using wp_nav_menu and I have a need for custom implementation. The default markup is like this: <ul> <li id="menu-item-59" class="menu-item menu-item-type-post_type ...
0
votes
1answer
259 views

wp nav menu: show submenu below li item

I'm trying to figure out if it's possible to show the submenu's outside of the relevant li tag. For example, this php: wp_nav_menu(array( 'menu' => 'side', 'container' => false, ...
0
votes
1answer
5k views

wp nav menu: add attributes to menu items [duplicate]

I'm trying to figure out if it's possible to attach an attribute to a wp nav menu item. To demonstrate, this php: <?php wp_nav_menu(array( 'menu' => 'main', 'container' => ...
0
votes
1answer
489 views

How can I make a menu link visible only to admins (without plugins)?

I use a menu on top of my wordpress which shows 3 links. Main page Custom Page Custom Page Can I add a 4th link to my menu which is visible and accessible to admins only (without plugins)? This ...