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)

-3
votes
0answers
10 views

Fit 'ANY LIST SCROLLER' (jquery scroller) to wordpress menu

I want to apply the 'ALS' jquery plugin on Wordpress menu. I have 2 menus in my web site, and the jquery plugin should be allied only on one of them (lets call this menu - 'menu-1'.) Here the link to ...
0
votes
0answers
10 views

Use Walker_Nav_Menu to remove automatically generated classes but keep user-added classes

My custom nav walker is outputting link elements like this: <a class="test-page-class menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-4 ...
0
votes
2answers
38 views

Add dynamic content block to nav section generated by custom walker

I am working on a theme that requires a piece of dynamic content nested in the navigation. I'm using a custom walker to generate the menu. I need a way to add markup to the code that will be editable ...
0
votes
0answers
18 views

Editing attributes of ul and div by wp_nav_menu

According to documentation of codex site, the code $defaults = array( 'theme_location' => 'header-menu', 'container' => 'div', 'container_class' => 'navCtrl', ...
0
votes
1answer
21 views

List all posts from custom post type by taxonomy

Having custom post types with taxonomies. Lets say I have a custom post type "Products" with taxonomies "new", "old", "fashion". Now I have a Nav where I can click on ...
0
votes
1answer
12 views

How to make menu items active based on hash

I'm creating a Wordpress portfolio site using the Simone theme. I have three menu items that link to the same page but with different hashes: tovly.com/work/#work-all-work ...
0
votes
1answer
22 views

Nav style for current page with custom post type

I'm trying to style the navigation of a WordPress site using the following CSS to highlight the current page or parent page. I'm using a custom post type to display projects. .current-menu-item > ...
0
votes
0answers
23 views

sharing slug between taxonomy and custom post

I am having trouble getting the relationship between a custom post and assigned taxonomy to work. The custom posts are clinics, the taxonomy is the location of each clinic: ...
0
votes
0answers
21 views

Adding custom page to the nav admin menu [duplicate]

I have added custom WordPress admin menu and pages, however, I would like for it to appear in the "Appearance > Menus" section so that the user can add it in the menu structure of their website. ...
1
vote
1answer
33 views

JSON file export of nav menu

I am trying to export the essence of my wordpress site's menu in json notation. I want to extract some details like id, type, name, sub-item and want to construct a Json object like below. Item - ...
0
votes
0answers
33 views

TwentyTwelve child theme mobile menu not working

I have a pretty simple child theme of Twenty Twelve active, but the mobile menu does not expand when pressed. Here is header.php: <?php/** * The Header for our theme. * * Displays all of the ...
0
votes
2answers
17 views

Adding a filter with custom function to the menu / navigation

I'm going to get crazy with the problem: I want to add a specific css class to the menu items, depending on a custom taxonomy. This is my code so far. add_filter('nav_menu_css_class', ...
0
votes
0answers
17 views

How to stop showing menu in static home page

Ok, I'm creating a wordpress theme. I don't want my navigation menu to show in the home page "Only" if the site admin setup Front page displays > A static page (select below). otherwise I want to ...
0
votes
1answer
25 views

How to add category post count in main navigation menu [closed]

Can you guys can help me on how to add/show the post count for category in main menu. eg: Web Design (10) | Typography (12) | Inspiration (10) | Business (19) I’m using Hueman & Hueman child ...
-1
votes
0answers
19 views

Hueman theme - How can I set a unique header menu on a specific page? [closed]

I am using the Hueman theme, which is great. I would like to set the header menu on a certain page (stocks) to be a unique menu which I created (US, UK, CAN, AUS). I am not very familiar with PHP, but ...
0
votes
1answer
16 views

How to add scroll IDs to WordPress menu anchors

In my theme the top menu is like this: <nav> <ul> <li> <a class='active' data-scroll-nav='0'>Home</a> </li> <li> ...
0
votes
0answers
18 views

Posts of Certain Category as Menu

I want to retrieve posts by certain category dynamically as a menu. What I need is: On the left-side of the page I want to display a menu as following | Category Name | | Post of This | | ...
0
votes
1answer
20 views

change link of menu particular tab

Wordpress theme - Twenty Twelve. I want to change link of menu. Current --> No link. Required -->#about (link for particular tab only) I've tried to change link from menu tab (Apperance ...
0
votes
0answers
7 views

Change Custom Menu Header Manually

I am working on a legacy site and typically don't work with Wordpress, so I'm crashing very hard into the WP world here. Basically, from what I can tell the site has these Custom Menus set up. I want ...
0
votes
0answers
11 views

Same menu is being displayed twice - one is overriding the other

I've registered three menus in functions.php like so: add_action( 'init', 'register_my_menus' ); function register_my_menus() { $menus = array( 'ranges-menu' => __('Ranges Menu'), ...
0
votes
0answers
13 views

Customizing label/title output of admin nav_menu selecter

On the left side of the menu editor, where you can add Page, Posts, Links, or Categories to a menu, how would I append a string to the title that shows up next to the checkbox? I've tried using ...
0
votes
2answers
16 views

Create menu without admin panel

I am wondering where I can create menus without using the admin panel, or if it is a waste of time. In admin you can go to Appearance => Menus Where you can select a number of pages to add to ...
0
votes
0answers
18 views

drag & drop re arrange menu items in front end page

in my WP MultiUser project i am designing a template for managing the menu like delete page, drag & reorder menu items by using below code <?php $menu_name = 'header'; if ( ( $locations ...
0
votes
1answer
69 views

How to target specific wp_nav_menu in function?

I am adding a specific class on my wp_nav_menu link via function.php but I am not able to target a specific menu: This is what I got which targets all wp_menu_nav on my page: function ...
0
votes
0answers
10 views

Menus: Item appears twice in menu, current item classes fail – Bug?

I think I found a small bug in how Wordpress handles CSS classes applied to menu items. I would love to fix it, but so far I wasn't able to pinpoint the problem - it's probably in ...
0
votes
0answers
22 views

Custom menu walker: Repeating a menu item when it has children

I am trying to repeat a menu item when it has children. To better understand, maybe take a look at this example markup: <ul id="main-nav"> <li>Item 1</li> <li ...
0
votes
1answer
15 views

Admin menu post type

Is it possible to get a container post type menu item with all custom post types inside of it?! 1.All post types 1.1 post type 1 1.2 post type 2 1.3 post type 3 1.4 ect....
0
votes
0answers
29 views

Best practice for blank top level menu item?

I create a LOT of WP sites and therefore tons of menus. A lot of times there is no sensible page for a top level menu item. For instance I was creating a site with internal learning. The top level ...
1
vote
0answers
17 views

Dropdown menu issue

I've just installed wamp on my pc and i'm trying to setup my test site. I've installed WP 4.0 so the default theme is 2014. I have created a menu with 1 dropdown for testing purposes but the ...
0
votes
1answer
27 views

menu item active class for author.php

I am building a custom theme. For the author.php file that displays an author profile with their posts, I would like my 'About' menu item to turn active (get active class). I have tried: ...
0
votes
2answers
26 views

Extend Individual Menu on Page Function to individual Submenue on Page Function?

It seems that WordPress Development is building a knowledge-base about the best functions out there. Thanks a bunch this helped already a lot! I found a function (find it down here) that offers a ...
1
vote
1answer
16 views

Check what “type” a menu item is

The question I would like to check what type of menu item each item in my menu is i.e. is it a Page, Category, or Custom link. What I want to achieve I want to create a menu made up of categories ...
1
vote
2answers
65 views

Anchor only wp_nav_menu

I am trying to create a list less wp_nav_menu. Below is the desired output: <nav class="nav header-nav"> <a href="#" class="nav-link nav-active">Home</a> <a href="#" ...
0
votes
0answers
9 views

Top level menu items different container than sub menu items

Is there a way to split the menu into two containers. The top level items would be in a separate container than the sub menu items. Here is the default structure <ul> <li> <a ...
0
votes
1answer
18 views

Showing the same menu in multiple location

Today I have faced an weird problem regarding WordPress menus. Here is the register function of my menus - function register_adaptive_menus() { register_nav_menus(array( 'top-menu' => __( 'Top ...
0
votes
2answers
47 views

Hide a Menu Item on Login

I am using the following code to hide a menu item when a customer is not logged and show it when a customer is logged in. .hide-item-not-login{ display: none !important; } .logged-in ...
0
votes
0answers
40 views

There is a code that I don't understand - menu customize with walker

Here is a code I got from internet: (of couse I do not own it) class description_walker extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global ...
0
votes
1answer
21 views

Sub Menu content is being duplicated

In the plugin I am developing I am using the following code to build my menu - add_menu_page('BCRM Plugin Settings', 'BCRM', 'administrator', __FILE__, 'bcrm_settings_page', BOOGIE__PLUGIN_URL . ...
0
votes
1answer
22 views

Displaying menu based on login status

I'm trying to show one menu based on whether or not the user is logged in. It's straight forward enough but when I change to my code I have no styles or icons like the original - see code below ...
1
vote
0answers
13 views

using plugin to add menu item to external page [closed]

I have a wordpress plugin that is working well so far. The last step for me is to have it create a menu item on the main navigation menu to an external page when you activate the plugin. Not sure how ...
0
votes
0answers
12 views

Adding Class and div id to wp_list_categories

I am trying to create a dropdown menu for wp header with categories and children as dropdown but cant find a solution, trying to get somethink like this <li class="Main-Cat"> <a href="Link ...
0
votes
0answers
9 views

Auto-build First Instance of Menu from Page Structure

I am wondering if there is a way to build a custom menu that is initially populated by the current page structure. I am working on a site that was initially build pre-custom menus, but now we want to ...
1
vote
1answer
23 views

How to change menu URLs to hashes?

I'm building a fullpage Wordpress site. Meaning the pages are not separate URLs, they are accessed through the same URL. Something like deuxhuithuit.com. So I have a menu that the admin creates by ...
0
votes
1answer
21 views

Next page link via the custom menu

I would like to display a "next link" at the bottom of several page templates, using the actual custom menu in which they sit in. I built a function that mostly works except for an edge case ...
0
votes
3answers
55 views

Wordpress Login/Logout Single Menu Only

I've written this login/logout for my functions.php in my wordpress theme. The problem is, it's showing a login/logout link in all menus both primary and secondary. Is there a way to get it to ...
0
votes
0answers
16 views

Display the nav menu for a particular page id

Say that I have the id of a page that is in the wp_nav_menu() I would like to show the wp_nav_menu() for that particular page. Is that possible? I can use wp_get_nav_menu_items() to get all items for ...
0
votes
0answers
17 views

How to leverage hefty memory actions from programmatically creating nav menus

I'm working on a plugin right now and hitting a wall. Long story short, part of the plugin process is to construct a dynamic nav menu. This nav menu can get rather large, and I'm finding that it seems ...
0
votes
1answer
26 views

Is there any way to recover deleted menu from database sql backup

i accidently deleted my main menu but i have a .sql database backup file and i want to recover my menu from this file. Is it possible? Thanks.
0
votes
1answer
39 views

Menu is not visible in appearance

I have added following code to my function.php function register_my_menu() { register_nav_menu('header-menu',__( 'Menu' )); } add_action( 'init', 'register_my_menu' ); And here is my code where ...
0
votes
0answers
16 views

current_page_item not being added in menu output

I've created a menu that I call on using following code. <?php wp_nav_menu( array( 'menu' => 'Primary Nav', 'container' => '', 'items_wrap' => ...