Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sub-menu]

The tag has no usage guidance.

0
votes
0answers
25 views

Show all menu levels except top level. How to exclude top level of a menu?

I have a menu that looks like this: Women and Men har the top level menu items while the lower nagivation menu items are the children. The menu structure looks like this: Women New styles ...
0
votes
1answer
28 views

Insert link in sub menu - Admin panel

Hi this is my code. add_menu_page('Titlemenu', 'Titlemenu', 'read', 'a-functions', array(&$this,'namefunctions1')); add_submenu_page('a-functions', 'title1submenu', 'title1submenu', 'read', '...
0
votes
0answers
12 views

Create a WordPress menu with many levels without using the walker class or wp_nav_menu from scratch

SPOILER: it works nicely only if you have a two levels menu Here's my problem. My goal is to build a Wordpress menu from scratch, without the support of the walker class or the classic WordPress menu....
0
votes
0answers
16 views

Where to place a svg chevron down in my custom walker?

i am a bit stuck with the custom walker in my Wordpress theme. I wanted to place a svg chevron down on the first link when a submenu is detected. My theme uses a svg file with all the svg paths. The ...
0
votes
0answers
17 views

Add wrapper for a specific sub-menu

I am trying to add a wrapping div around a specific sub-menu. what is the best way to do it ? is there a way to target the sub-menu and modify it or should i just use 'wp_nav_menu' or '...
0
votes
0answers
16 views

Implementing the menu li ID into the ul.submenu using walker and the start_lvl function

I would like to display the menu ID with my prefix (parent) to the ul.submenu within a data attribute. Here's an example of the output I am after: <ul id="menu-main-nav" class="menu"> <...
0
votes
0answers
5 views

Statically populate menu with childs

My problem is very simple. I want to add all pages and subpages of a given parent page inside a menu. The problem is that the few plugins I found for this purpose, JC's Submenu or Gecka Submenu, do it ...
1
vote
1answer
242 views

Wordpress sub-menu items suddenly not showing

None of my submenus are showing. They all show up in Appearance->Menus, but not on the actual website. I've deactivated all of my plugins so it's not being caused by that. Help? Website: http://www....
0
votes
1answer
19 views

Horizontlal scrolling content

i’m looking for a plugin (or something else) that could reproduce the horizontal sub-menu and scrolling content we can see on this page when you click on oeuvres/expostions/etc… : http://www....
0
votes
0answers
7 views

No subpages because I do not have a post id from the main page

I get the sub pages on the main page, only if I am on a subpage, then I have lost my post id. How can I ensure that I see the other subpages on the subpage $args = array( 'post_type' => '...
0
votes
1answer
31 views

Add href to <a> tag in nav menu for mobile

I have a primary menu which is displayed for desktop <?php //Show the navigation menu wp_nav_menu(array( 'theme_location' => 'primary-nav', 'menu_class' => '...
1
vote
0answers
386 views

bootstrap menu parent toggle and arrow

I have created a menu in Bootstrap 4: Here is the code: <section class="menuBar"> <nav class="navbar navbar-expand-lg navbar-light" data-toggle="sticky-onscroll"> <div class="...
1
vote
1answer
963 views

Multi Level Bootstrap Navigation Menu in WordPress

I am converting a static website made with Bootstrap in WordPress. Here is my bootstrap multilevel navigation menu code: <section class="menuBar"> <nav class="navbar navbar-expand-lg ...
0
votes
0answers
22 views

How can I stop javascript from moving the submenu when I click it?

I'm working on this site: http://editingplus.com.au In the submenu Resource > Getting published, at some screen sizes when a link is clicked, instead of navigating to the link the submenu jumps to a ...
1
vote
0answers
25 views

Remove add news page and posts from menu

I want remove add news page and posts from left menu I try to use remove_submenu_page('edit.php', 'post-new.php'); but it only remove add news from posts, I need to remove add news from pages too.
1
vote
2answers
212 views

Highlight current post ancestor parent menu items

The default menu classes in WordPress are pretty useful. But one problem that i stumble over from time to time is with categories as subitems in menus. For example the following menu structure: Page ...
0
votes
1answer
15 views

Controlling the position of dropdow submenu

can someone explain how I can modify the position of a submenu so that it can be higher than it is now (eg closer to the menu bar, without the gap between the header and the dropdown box of the ...
0
votes
0answers
26 views

Creating submenus for menu with profile image using wp_nav_menu_items

I am creating a custom menu that shows the profile image and logged in user name of the user with the help of 'wp_nav_menu_items'. Here, is the code that I am using to create the menu, function ...
0
votes
0answers
203 views

Add Product categories to Wordpress menu without losing hierarchy

I need to add product categories to Wordpress menu, but when I'm doing this with WP interface it lose the hierarchy I tried with WP-CLI, but there is no method to specify wich item is the child. ...
0
votes
0answers
458 views

Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce]

I am trying to add a conditional Login/Logout button depending on the user role. (if the user is logged in or not). I have gotten this to work, but only when accessing the menu items as a string and ...
0
votes
1answer
55 views

Add (grand)child pages automatically to nav menu

I want my submenus to be generated automatically. I've used some plugins for this, but after a while they don't get updated anymore or they have a conflict with the theme I use. I followed this ...
0
votes
0answers
17 views

Drop Down menu not showing on desktop but is on mobile

Having a real hard time figuring this out but a menu I am trying to edit for a friend the secondary drop down menu is not showing. So in Wordpress I have created a menu as normal, with the drop down ...
0
votes
1answer
28 views

How to have submenus collapsed until they are clicked?

I have couple of main admin menus and sub-menuse underneath them. Main menu1 Sub menu 1 sub menu 2 sub menu 3 Main menu2 Sub menu 1 sub menu 2 sub menu 3 Like ...
0
votes
0answers
292 views

Sub Menu not showing on hover or click for Menu but showing in Menu

The following site http://beta.stccrystalsandgems.com.au/test-page/ has a side menu on the left with a menu which I have a sample of categories with products. The sub menu was working for a different ...
2
votes
3answers
454 views

Generate a Menu that displays all child pages of top level parent

I used this answer's code to generate a widget that displays all subpages of the parent's page: if (is_page()) { global $wp_query; if( empty($wp_query->post->post_parent) ) { $parent = ...
0
votes
1answer
53 views

Custom Walker menu depth opening problem

I'v create custom categories walker menu: <?php /** * Show Categories menu * */ $seller_id = (int) get_query_var('author'); ?> <aside class="cat-menu"> ...
1
vote
0answers
76 views

Possibilities for the edit.php admin panel? [closed]

Here's my scenario: I'm building a Wordpress backend that links two custom post types for an HR department: Job Listings and Applicants. Job Listing posts are created manually by the HR admin. ...
0
votes
1answer
96 views

After moving my site, sub-menus are not showing [closed]

After moving a WordPress site to a new host, my sub-menus on the main nav are not dropping down on hover. I notice in the Source file that the code for all the sub-menus is there but is greyed out. ...
0
votes
1answer
37 views

Getting parent object_id of child menu items in WordPress menu

I am building a menu for a client that grabs custom field data from the top level menu item's pages and adds data-color to that menu item. I have that part working no problem. The issue I'm having is ...
0
votes
0answers
26 views

One page menu scrolling issue on sub pages

Site URL: http://2y2d.org Hello, This is my website http://2y2d.org, When clicking on the top main menu it scroll down to the respective section perfectly. But when you visit any subpages like http://...
0
votes
1answer
99 views

get_the_title() gets printed out twice

I made a script which checks if the currently viewed page has a parent page and if it does, it prints both the parent title and child title. But if there is no parent page I still get a title of the ...
1
vote
0answers
96 views

How to retrieve parent menu item name of current submenu item

I have a menu item Services which has 5 submenus. Now when I click on one of those submenus, like Flexible Endoscopes I manage to echo the title of child item or current page title. But I can't find ...
0
votes
2answers
635 views

Wrap list parent in div with wp_nav_menu menu

Hello I have a menu with parent and children. Here is the code I am using to display it: <?php wp_nav_menu( array('menu' => 'Main Menu')); ?> This spits out something like this: <div ...
0
votes
0answers
42 views

Walker only for sub menu

I try, with a walker, to add the thumbnail as image-background of sub-menu. This is my walker : class MyTheme_Walker_Nav_Menu extends Walker_Nav_Menu { function start_el( &$output, $item, $depth ...
0
votes
1answer
219 views

Admin - Custom Post Type in WooCommerce menu - how to control menu order

I'm using WordPress 4.9.1 and WooCommerce 3.2.6. I have added a new Custom Post Type (Subscriptions) and inserted the menu item under the 'WooCommerce' menu in the admin panel using 'show_in_menu' =&...
0
votes
2answers
35 views

Incorrect Behavior on Wordpress Main Menu

On my WP site, I want to create a menu which includes sub-menus inside a dropdown. I structured my menu to be like this: From what I have seen from several WP tutorials on the web. It is expected ...
0
votes
1answer
146 views

How to access into the description of a sub menu

Well, I'm trying to get the description of a menu item and of a sub menu with the code attached below, but I'm not able to get it. I'm trying to get the description of "About us" and the description ...
0
votes
1answer
132 views

Get the page IDs of a Particular Menu item's submenu

I have been searching. And searching. I have found many, many ways to get the submenu, but they all seem to include the <li> and classes. I do not want that. I want to get an array page IDs of a ...
0
votes
1answer
60 views

Generate Submenu based on Parent Page using If Statement

I need to pull a sub-menu depending on the parent page (or section) of the website. I have three sections (Our Inn, Our Restaurant, Activities) each requiring an individual submenu that my client will ...
0
votes
0answers
22 views

Menu/sub-item urls are queries, how do I make the resulting slug prettier?

My site has a product sub-menu where the custom URLs are actually queries which render different product lists. I want to alter the resulting URL so we go from an ugly looking query like this: ...
0
votes
1answer
844 views

Show parent categories and sub categories but not grand children categories

I'm struggling with displaying sub categories limited to only direct children of the parent on category page... I hope someone can help me with that :) I have working code - when the current category ...
1
vote
1answer
818 views

How to give position to Submenu under custom post type

I am trying to add submenu under my custom post type and i succeeded also but it shows just under the post-type, i want to show it under the taxonomy. How to give a position to the newly created sub-...
0
votes
1answer
75 views

How do I hide submenus from the top menu bar?

My website is wiki-style and has a lot of pages that should only be reached through links on other pages. Having these all accessible from the top menu bar under their respective headings leads you ...
0
votes
0answers
362 views

Add div inside submenu

Is there a way I can add div inside submenu? I want it to look like this. <nav class="nav"> <ul class="primary-nav"> <li class="has-children"> <ul class="...
0
votes
1answer
2k views

(Solved) How to add a submenu toggle button inside all “li” elements that have a submenu?

I'm building a mobile navigation menu. I wan't the menu to work like this: In this image you see a mobile nav with multiple depth levels. This is how I wan't the code structure to look like: <ul&...
0
votes
1answer
231 views

sub-menu does not show on the very top bar

I am using Hestia wordpress theme and i want to create a sub menu on the very top bar, the problem is when i click on it, the link seems to be active but the sub menu does not show. I am working on ...
0
votes
1answer
668 views

How to include a third level with wp_get_nav_menu_items function

I'm trying to create a custom menu structure that will work with jquery push menu's. http://multi-level-push-menu.make.rs/ All is working fine with the 1st and 2nd level. If I try to add a third ...
0
votes
0answers
864 views

Custom Nav Walker sub-menu

I am trying to change the markup of my main menu. Currently I've got the following code when my menu is generated : <ul id="menu-menu" class="menu vertical medium-horizontal"> <li><...
0
votes
1answer
26 views

Add subemenu option page

How can I create a submenu page like this? I have taken a look at add_menu_page and add_submenu_page, but I dont get further from there. Any help is appreciated.
0
votes
1answer
38 views

Change font and Colours in Menus

I am new to WP and hoping to get some help. I am well on the way to building my new website, but have some small detail issues. I would like to change the font, size and colour of my Menu titles, and ...