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)

1
vote
1answer
45 views

Which settings/options are saved on a theme-basis and how does this affect theme-switching?

I realized that when switching the theme (in my case to a child theme) some things don't stay the same: Widgets Menus At least this is what I found out so far: Widgets Don't lose widgets when ...
0
votes
0answers
26 views

wp_nav_menu: current_post_ancestor-category parent

I have a nav like this: page 1 -- page 1.1 -- category 1.2 page 2 page 3 When I am on a single post in the category 1.2, the category-menu-item gets the correct class current-post-ancestor and ...
0
votes
0answers
50 views

Post label “new!” in wp_nav_menu using class?

I'm looking for a function to add a "new" label in front of my custom post type name in my navigation menu. The code is : <?php $args = array( 'numberposts' => '1' ); $recent_post = ...
2
votes
0answers
119 views

All Menu Items Disappear Seemingly at Random [duplicate]

For the last month or so, seemingly at random and with no discernible pattern, my menu disappears. However, when I look at the Dashboard, what I find is that all the menu items have been deleted but ...
1
vote
0answers
34 views

Unlimited WordPress Menu

I am limited to like 80 menus. My menu consists of 1000 menus. How can I increase the limitation of Appearance > Menu I tried modifying the php.ini (using reseller account) and increase the max_var, ...
0
votes
0answers
21 views

how to proceed for a “new!” label on menu_nav? [duplicate]

I'm developing in Wordpress and would like to assign the label "new!" to specific custom-post-type's (not necessarily all post-types) if they contain new posts in the last 30 days. I found this code ...
0
votes
0answers
30 views

When submitting more than 200 menus, I get “Service Temporarily Unavailable”

I have a site with a large number of nested menus. I solved the problem after following the solution proposed here Menu limit, cannot add new menu items and including max_input_vars setting. For ...
0
votes
2answers
115 views

Override custom menu widget

I would like to override some mark-up and css (like <div class="soma_container"><ul class=""></ul></div>)styling on a chosen custom menu widget. How would I do that? Should be ...
0
votes
1answer
128 views

Theme: Twenty Thirteen Mobile Sliding Menu Doesn't Bump Content Down

I have created a child theme for Twenty-Thirteen and somewhere while editing it I broke the mobile menu slider as it no longer pushes the content down and instead displays behind the content. I've ...
0
votes
1answer
53 views

Use wp_nav_menu to display ALL pages

I am currently building a wordpress theme. For the menu, I just want to display all the pages that are created in the order that they are created in (i.e. I don't want users to have to go into the ...
0
votes
1answer
926 views

Custom Nav Walker sub-menu HTML construct

I've got my Custom Nav Walker set up and it works fine with the main menu items, and displays them how I want. However the same HTML is being applied to the sub-menu elements which isn't what I want. ...
0
votes
1answer
38 views

Add a string after each item in Wordpress sub menu

I am trying to add a special character to display a » alongside each menu item in Wordpress. So for example About us » Contact us » And so on... Here's my code <li><?php echo ...
0
votes
2answers
196 views

Current menu item

I'm trying to figure out why my text is not showing white as it should. I'm overriding bootstrap.min.css in style.css the current-menu class in Wordpress, but no success. It highlights the right ...
0
votes
1answer
29 views

add_media_page function not creating submenu

I have the following plugin that I'm just testing at the moment. /* Plugin Name: Menu Test Plugin URI: http://codex.wordpress.org/Adding_Administration_Menus Description: Menu Test Author: Codex ...
2
votes
2answers
150 views

Wordpress Split Menu

I'm coding my first WordPress Theme and trying to solve this problem: On the desktop version of the website I’d like to split the menu into 2 sections. One would appear on the left of the logo and ...
0
votes
0answers
99 views

Custom Menu echo own HTML

I've registered a custom menu and got all that set up, however the formatting of the HTML that the menu uses doesn't fit with the CSS/HTML menus I had previously and want to keep. Therefore I was ...
0
votes
1answer
167 views

Next/previous a-like single navigation

I have on the site navigation menu which uses next/previous functionality to navigate through the site. Currently it is a hard coded image map with related links on each page. I know how to get ...
1
vote
0answers
35 views

using OOP approach to create plugin but stuck at making hyperlinks to work

I am new to wordpress development so please be patient if my question sounds simple or ridiculous, since I have been doing object oriented programming in PHP so i wanted to use the OOP approach in ...
0
votes
0answers
150 views

Custom wp_bootstrap_navwalker file

I got a little problem right here. So I installed the wp_bootstrap_navwalker and it works so far. I got a 3 stage Navigation. The problem is that the navwalker adds the dropdown-menu class to every ...
0
votes
1answer
25 views

Why is only the first operation run in my loop - except for on the last repeat? [closed]

We have a custom walker displaying only the sub menu of the current top menu and while making some changes to it I ran into something I don't get - for some reason only the first echo of each loop in ...
0
votes
0answers
37 views

Problem with custom menu links when moving wordpress installation to subdirectory

I know there's a ton of posts pertaining to broken links after migrating a wordpress installation, but I haven't been able to find an exact solution to this one. A site I'm working on has the ...
-1
votes
1answer
43 views

Add monthly archives menu and submenu

I'm posting this question because I was trying to look for an answer but couldn't find it. I found the answer myself with the help of this answer and I wanted to share it with everybody that would ...
0
votes
0answers
23 views

Output only the 3rd level of menu

Currently I use wp_nav_menu to output the first and second level of the menu in the header of the page. However the menus have more depth than that and I need the third level to be shown at a ...
2
votes
1answer
121 views

wp_nav_menu() not working on Custom Search Page

I'm using WP Custom Search plugin to generate Advanced Search in one of my newly developed WP site. Though the plugin is not completely bug-free, but it's working just fine (excepts some Undefined ...
0
votes
1answer
285 views

How to get current page nearest parent id?

I am trying to get current page nearest parent id not top-level. For example I have added page like this: Now If I am in Junior Design Award 2013 page I want to get his parent id 765 not top-level ...
0
votes
1answer
38 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
47 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
75 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', ...
1
vote
1answer
2k views

Add custom menu item using wp_nav_menu_items filter

I have added a snippet to add a "Profile" link to my website navigation menu. My code: add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link'); function my_nav_menu_profile_link($menu) { ...
1
vote
2answers
204 views

Highlight current category, when using get_categories

I'm successfully using helgatheviking's answer from this post: Show children of top level category only See code below: // get the category object for the current category $thisCat = get_category( ...
1
vote
2answers
63 views

Detecting classes, adding widgets, and adding divs in with a Nav Walker

I've been trying to figure this out for days, to no avail. A template I'm building requires a mega menu. The markup for the menu looks like this: <nav> <ul> <li><a ...
1
vote
1answer
34 views

How should I build a custom menu walker for this setup?

I have a menu structure I built in HTML+CSS that I would like to incorporate into a WordPress menu, but I am new to extending the Walker class and was wondering if someone could show me an example of ...
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
52 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 ...
1
vote
1answer
127 views

Set if condition with wp_nav_menu

I have created one new menu and add bellow code in footer.php to display my menu wp_nav_menu( array('menu' => 'footer-cn', 'menu_id' => 'nav', 'menu_class' => 'ft-nav' )); Currently I did ...
0
votes
1answer
31 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( ...
-1
votes
1answer
76 views

How To Add Class To Style Search Box

I am not very experienced with PHP but have managed to find a snippet to add a search bar to my main menu, using this code in my functions.php file: add_filter( 'wp_nav_menu_items','add_search_box', ...
-2
votes
1answer
37 views

wp_nav_menu() doesn't assign proper class to elements and it forces wrapping the ul element

I'm having trouble with wp_nav_menu function. I want the menu to have no div wrapper; have the class sf-menu right for ul element of the menu and li elements not have any classes. I've tried many ...
0
votes
1answer
27 views

Custom HTML output for registered navigation

Is it possible to strip out the title / url from a custom navigation as to create a new HTML structure? I'm creating a very unique menu structure, based on the custom menu created by a user in ...
1
vote
1answer
42 views

Make parent page only link to first subpage

I'd like to automatically make any parent page link to it's first subpage if it has one. Like so: Parent 1 (/#subpage-1) Subpage 1 (/#subpage-1) Subpage 2 (/#subpage-2) Subpage 3 (/#subpage-3) ...
0
votes
1answer
38 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
133 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
38 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
227 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 ...
-1
votes
1answer
20 views

Changing Menu Fonts Design [closed]

I am using the 2011 theme and I would like to make the font that appears on the primary menu bigger and more stylish, is it possible for me to achieve this and if so, how to I go about it.
0
votes
1answer
66 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
2answers
122 views

Logout hyperlink within a sub-menu

I have the following secondary navigation menu on my website which has been built using the native WordPress Appearance > Menus feature: I am also using the following lines of code in my ...
-1
votes
1answer
57 views

How to make posts appear under pages

I have created pages for my website, however when i create a new post, it is not assigned to any page and i am missing the option to place it under a certain page. For example i have a menu like Home ...
0
votes
1answer
56 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 ...