Tagged Questions

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
29 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
41 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 ...
0
votes
1answer
36 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
19 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
22 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
13 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
17 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
18 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
20 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
51 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
88 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
19 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
34 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
20 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
42 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 ...
0
votes
1answer
48 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
27 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
24 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
89 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
15 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
21 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
61 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
42 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
23 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
15 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
16 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
12 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
30 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
26 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
65 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
18 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
18 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
41 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
64 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
17 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' => ...
0
votes
1answer
36 views

Add menu headings to Wordpress sub menus

I'm using the native Wordpress menu. I have two top-level links with sub menus - I'd like for those sub menus to display the name of the parent menu item. So if I have a parent menu item named ...
0
votes
1answer
25 views

wp_nav_menu not displaying the right way

I'm creating a theme using bootstrap and now I want to display the menu adapting it to bootstrap... so I'm using the Upbootwp_Walker_Nav_Menu to achieve this, and also sending some args to the ...
0
votes
1answer
32 views

Mobile Menu Not Working

The mobile menu stopped working after I updated WP to the latest version, I assume it has to do with a customization of the theme. http://kvintage.com/ Wondering if anyone could please take a quick ...
0
votes
0answers
119 views

Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?

I'm working on a new theme to replace an old one. The existing theme has custom menus and I can't figure out why in my new theme a call to has_nav_menu is always coming back false. In my ...
0
votes
0answers
21 views

Fixed top-level menu

I'm developing a site which has around 10 top-level pages in the menu and each have 4-5 child pages in the sub-menus. I am giving the site users the "Editor" role which I have customised using a ...
-1
votes
1answer
29 views

Customizing Responsive Themes Menu [closed]

I use the popular theme: https://wordpress.org/themes/responsive I would like to change the color of one of the menu items and if possible also have a jquery popup from one of the menu items. How can ...
0
votes
1answer
50 views

Wrap description and sub menu in a wrapper

I am trying to add a wrapper to description and sub-menu in wordpress using walker class, Description will only be shown for the first menu so the structure will look like this EDIT I have been ...
0
votes
1answer
99 views

How to add custom field option with menu?

Please take a look at below image. Here we can see URL, Navigation Label & Title Attribute under Menu Structure >> Home. I need there a more option called "Data Description". I have a task to ...
0
votes
1answer
74 views

Remove all nav menu classes except those which begin with certain letters

I'm currently using a function which strips out all the unwanted classes from my nav menus, leaving only the classes I want to keep (the ones listed in the array inside the function). It looks like ...
0
votes
0answers
36 views

wp_nav_menu use #<slug> instead of permalinks

I need help modifying the wp_nav_menu arguments so that it can generate a menu which has # instead of permalinks.. I know I can add custom link menu items, but I want the menu to be more dynamic .. ...
1
vote
1answer
54 views

How to drag multiple menu items at once in WordPress?

Say, I added 8 items to a menu. Now I want to bring all the 8 items under another item. Dragging them one by one can take ages. How do I drag them all at once?
0
votes
1answer
22 views

Menu Structure with Links failure to update

Sorry if this sounds like a newbie question but this is driving me crazy and I can't seem to figure it out. I want to add a link called "About Me" to my Menu that redirects to another website. It ...
1
vote
1answer
31 views

Change hyphen/dash for vertical line in menu [closed]

I have the theme Blaskan installed. I have a child theme installed also, but I cannot seem to change the hyphens/dashes to vertical lines | in my menu for this theme. Any suggestion would be ...
0
votes
2answers
26 views

How can I make this custom design menu work in wordpress?

I can make wordpress custom menu,but I got a problem with this type of menu. Can anybody give me any suggestion how to make this menu dynamic? screenshot: http://awesomescreenshot.com/0ab3d6an94 ...