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

Add link at the end of wp_nav_menu

I need to add a conditional menu item such as "/at" or "/de" or "/ch" in the wp_nav_menu. Since the link is conditional (based on the country the website is being viewed), it can't be added from the ...
0
votes
1answer
42 views

How to get current menu item “CSS Classes” value?

While on any given link that has a CSS Classes value, I'd like to do something like this: $css_classes = get_current_menu_item_css_classes(); if ( $css_classes == 'mycustomclass' ) : // do ...
0
votes
2answers
59 views

How to get main menu only with wp_nav_menu

I have created one menu and have some sub-menu but I don't want to display any sub-menu from my template. My Menu code: <?php wp_nav_menu( array('menu' => 'header-uk', 'menu_id' => 'nav', ...
0
votes
0answers
27 views

Duplicate WP3.0 menu php files?

He's my problem: I want to have a single page that a WP-admin can build by including different parts of the site by choosing posts. (I know the admin could add these posts to a category and then ...
0
votes
0answers
48 views

Conditions for single post

I want to add current-page-anchestor when a single post is browsed. I was looking for that function code and tried many, but with not success yet. Now I am thinking I can do it that way, then it would ...
0
votes
1answer
28 views

How can I pass value to function in add_menu_page?

I was use to pass value to function for the below menu. add_menu_page('Competition Manager 2013-2014', '2013-2014', 'manage_options', 'manager_2013_2014', 'manager_2013_2014', plugins_url( ...
0
votes
1answer
34 views

nav_menu: how to force a subpage switching on the parent menu

I've been using the native wp_nav_menu to output my navigational elements. I have also created a subpage that is nested under one of my menu, but when I hit that URL the default custom walker clearly ...
0
votes
0answers
98 views

Keep active class in post page

I have one category and under this category I have many posts. Normally when I go to my category page from menu it added active class class="current-menu-item". Bellow is the rendered html <ul ...
0
votes
0answers
35 views

Remove 'home' from nav menu

I moved my page navigation from the header to the footer and now I am trying to remove 'home' from the navigation. In functions.php I added this - register_nav_menus( array( 'primary' ...
0
votes
0answers
27 views

How to display the FAQ Archive page in my menu

I'm using the Wordpress standard menu. I've also created a custom post type. I'd like to include my custom post type archive page (the all item) in the Appearance -> Menus, but so far I can select ...
0
votes
0answers
132 views

Nav menu custom walker not working in child theme

I have created a parent theme with a nav menu walker that works fine. I want to create a child theme to show small variations to the client. When I put the same code in the child theme it doesn't ...
0
votes
1answer
62 views

wp_list_pages, links only for pages with no children

Is this possible to do, and what is a best practice solution? The things I can think of is parsing the page structure myself, or do it with JQuery to convert <a> to <span> or similar. Is ...
0
votes
1answer
46 views

Programmatically add posts from specific category to menu

I am wanting to add individual posts to my primary menu programatically based on category I have used the wp_nav_menu_items filter previously to add pages to the menu but I am stuck when it comes to ...
0
votes
1answer
80 views

current_page_item is missing inside wp_nav_menu

I'm using the function wp_nav_menu like this: <?php wp_nav_menu( array( 'container' => false, 'echo' => true, ...
0
votes
2answers
135 views

Wrapping link and .sub-menu with wp_nav_menu

I want to wrap each sub-menu ul and the tag just before it with a div. I can create the opening tag using the 'before' attribute of wP-nav_menu like this: wp_nav_menu(array( 'before' => ...
0
votes
0answers
35 views

wp_dropdown_nav function to list menu items

Is there a wp_dropdown_nav function to list the menu items in a dropdown the same way as like in wp_dropdown_categories. I need to display a menu when the media size is greater than 480px and ...
0
votes
0answers
34 views

Menus not showing in the admin menu, after save

I updated wordpress to v3.9, I added several custom links and pages in that menu, saved it and after that the menu editing UI disappeared: Here is image how it looks now and what JS error it ...
0
votes
0answers
12 views

Custom nav walker error [duplicate]

I'm using wordpress 3.9 locally to develop a new theme for my website, however I am getting these errors when trying to use a custom nav walker function: Strict Standards: Declaration of ...
0
votes
1answer
28 views

How to change page location in Wordpress

I want to change my page location (link address). My blog page location is: http://localhost/wordpress/?page_id=1336. I want to change blog page location http://localhost/wordpress/?page_id=1336 ...
0
votes
0answers
40 views

Getting post content within wp_nav_walker

I have a custom walker set up designed to add content into the nav menu. The problem being that it is not pulling the content. The post object returned by the get_post/get_page has an empty ...
0
votes
0answers
55 views

Get child taxonomies in loop

Here is the structure of taxonomies what I want to display: Here is my HTML code loop: <li> <a>TAXONMOY 1</a> <div class="dropdownContainer"> <div ...
0
votes
0answers
26 views

Adding new menu items with wp_nav_menu_items

I am trying to add menu items dynamically using the wp_nav_menu_items filter. What I am doing is working fine on two of my menus but I cannot make it work for the third. Code to register the menus: ...
0
votes
0answers
31 views

Open first link in subnavigation when clicking top navigation

For example: I got a menu item called Food which has 2 subnavigation items, pizza and pasta. I want it to be, that if you click on food, that it automatically links to pizza (the first subnavigation ...
0
votes
0answers
35 views

Override edit_custom_walker.php to conditionally show input depending on menu position

I've created custom inputs for WordPress nav-menus admin page. I've used a similar technique as is shown in this answer - by duplicating edit_custom_walker.php and adding my own fields. My custom ...
0
votes
0answers
24 views

What's the policy for building a theme that doesn't support widgets/menus?

I'm developing a minimalistic theme, and my plan is not to include menus or widgets in it. The Theme Review page on wordpress.org states: Whether implementing required, recommended, or optional ...
0
votes
1answer
57 views

“Current” class on a singular page menu item with custom post types?

I'm struggling to get a "current" class for the corresponding menu item when I'm on a singular (child) page of a custom post type. These are the arguments I used when registering the post type with ...
0
votes
0answers
66 views

Get Next/Previous (Sibling) Top Level Parent Page Id - Wordpress

Question: Is there any possibility to get next/previous page id in wp_nav_menu in wordpress. Example: I have navigation menu like this Menu_Item_1 (ID = 5) >SubMenu_Item_1-1 ...
0
votes
1answer
78 views

Customize Walker_nav_menu to show posts if item is category

I would like to customize the nav menu walker so that when it encounters a category it automatically makes the 5 most resent posts children of the menu item. Is there a way to dynamically add items ...
0
votes
0answers
78 views

Hardcoding links to wp_nav_menu

I am currently trying to add a some links to the end of my wp_nav_menu but am having a hard time with the callback function that creates the list of languages I want to insert. The first function is ...
0
votes
0answers
34 views

wp_nav_menu() reutrns HTTPS?

We have SSL for our domain. But there's only one page want to use SSL to appear on (https://mydomain.com/secure-page/). All others should be regular http:// pages. So we've set siturl and homeurl both ...
0
votes
0answers
48 views

How can I hide any submenu item from dashboard menu but still have access to it from direct url

I just want to hide a page but I want to access it by directly entering its url. But I am unable to access that page after remove_submenu_page() function. I get this error: You do not have sufficient ...
0
votes
1answer
120 views

Get the original menu item name string instead of the label

I am building a hierarchical menu of custom taxonomies and their related posts using wp_get_nav_menu_items as follow: if( $locations = get_nav_menu_locations() && ...
0
votes
0answers
11 views

Site Live Database Operations issues

I have a working site on a staging server. The live site is working perfectly, but none of the database operations is working. It doesn't even fire the select query. I have pages in wp_posts tabel ...
0
votes
0answers
63 views

Breadcrumbs using the Menu Structure.

I know there are several questions regarding how to use the menu hierarchy for breadcrumbs and I followed the instructions doing the following... I added this code to my theme's functions file: /** ...
0
votes
0answers
32 views

Conditional output for start_lvl based on title

I want to add a custom class to the UL tag on start_lvl if the user writes "full" on the title area of the menu. Something like this: public function start_lvl( &$output, $depth = 0, $args = ...
0
votes
1answer
54 views

Use menu structure for permalinks

I'm building a blog that is kind of split into 5 different parts. Example: I try to combine 4 brands and the company owning those brands on one website. Let's say the company is called "Apple" and the ...
0
votes
0answers
17 views

Extra Editing Box in WP Dashboard

So I am trying to add an extra box in the WP post dashboard. In this box I will add a piece of HTML code. This code created the box in the WordPress area: $woo_metaboxes[] = array ( "name" => ...
0
votes
0answers
25 views

Menu of pages with an image

I'm getting really desperate and I need your help, I really tried and research and I couldn't find anything yet. I'm new at wordpress.. and I have this question, I hope you can help me... I want to ...
0
votes
0answers
66 views

Plugin action hook fires when it should not (unrelated admin screen)

I maintain a plugin which generates a PDF of a page or post when an icon or link is clicked. PDFs may be cached, and as such, when a page or post is edited, we refresh the cache by regenerating the ...
0
votes
1answer
132 views

Remove nav menu item by script

I want to create my custom nav menu using a script in a wp plugin. I'm almost there using this tutorial. All I need is the option to delete menu entries. something like ...
0
votes
0answers
857 views

Adding menu items dynamically using wp_nav_menu_objects

On my primary navigation, I want each top level page to have a list of the subpages. So I created code that dynamically adds menu items to the primary navigation. This works only on the first level of ...
0
votes
1answer
65 views

How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?

I have the following problem developing a WordPress theme and I am here to ask you if this solution could be a good solution or if exist some better way to do. I have a custom WP theme and into this ...
0
votes
0answers
38 views

diginews theme, add image under navigation bar

I'm trying to add an image to the header under the navigation bar. I added the following line before at the bottom. <img src="public_html/wp-content/uploads/2014/03/books300x200.jpg" height="80" ...
0
votes
0answers
15 views

Get parent menu item id on submenu ul using start_lvl [duplicate]

I'm struggling with the Walker_Nav_Menu. In the start_lvl function, where I create the <ul> tag holding my submenu, I want to insert the item ID from the parent menu item. I know that I can ...
0
votes
2answers
1k views

Adding class atribute to wp_nav_menu ul

Update: this was caused by the fact that i didn't have a menu created in the menu page. I want to add a class to the ul of wp_nav_menu. I tried this code: <?php $defaults = array( ...
0
votes
0answers
22 views

How can I filter into the Wordpress back-end menu builder?

I would like to who the categories of custom post types in the wordpress back-end drag-and-drop menu builder. Is there a filter that I could use to add extra bits of markup there? My idea is to add ...
0
votes
0answers
72 views

Is a true MiniSite possible with WordPress?

I am creating a website that needs to have separate custom “portals” or “Sections” depending on which market you are in. Example situation: user lands on the home page. User looks at the top-level ...
0
votes
0answers
115 views

Split into two seperate unordered lists with custom walker

So I am trying to create a mega-menu using a custom walker through Wordpress. So far I have this for the walker: class oe_walker extends Walker_Nav_Menu { /** * Specify the item type to ...
0
votes
0answers
94 views

how to override menu widget?

I would like to customize the menu widget in sense to add some classes which would make it responsive. How do I override the default widget for menus? I use a custom template which supports bootstrap ...
0
votes
1answer
249 views

How to add menu support to a theme?

I tried few tutorials. All i think is i should use register_nav_menus() and then add the menu in header.php Here is the code i tried in functions.php from this help site itself function ...