Questions tagged [sub-menu]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
997 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
0answers
38 views

Add CSS Class to Wordpress Menu Item Dependent on the Page the User is Visiting

I'm trying to have menu items show an underline under the related nav item when when the user on a specific page (image attached). In the static site version of the site I'm doing I had a php ...
0
votes
0answers
17 views

drop down menu not working on wordpress it will redirect to base url

I have faced an issue on WordPress dropdown menu. When I click the link it will be redirected to base_url but the main menu is working properly. I changed the permalink to Post name but it still not ...
0
votes
1answer
161 views

sub menu link is not working

I am using a theme which is showing table of content by using this code : <div class="menu-panel"> <h3>' . __('Table of Contents', 'odrin') . '</h3> ...
0
votes
0answers
18 views

Why my dropdown menu is effecting main menu?

I have items in menu. And in one menu has drop down. I added in general way. But not working. It is breaking other menus. See the menu adding in wordpress.
0
votes
2answers
2k views

Show custom menu in category and its posts

I have a category X of posts. The category page and it's individual posts are all part of a custom menu consisting of pages and posts. My submenu, in the sidebar, works fine for showing on the pages, ...
0
votes
1answer
29 views

Custom Nav Walker Displaying Values in Sub Menu

I'm trying to display Submenu links within a Custom Tailwindcss / Vue component that I added within the Nav Walker. Menu Issues header.php <nav class="flex items-center justify-between flex-...
0
votes
0answers
12 views

Parent menu item with character space breaks dropdown for submenu

My team has a WordPress site with a custom FoundationPress theme. One of the primary nav items is "About us", this item has secondary items nested beneath it in a submenu. This is configured in the ...
1
vote
2answers
5k 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
1answer
902 views

Always show wordpress submenu on responsive header menu

I'm trying to edit my CSS to always show all the li tags inside my header menu, also with ul.sub-menu li; I just want to show all the items from the menu, but I'm working on it for hours and I've ...
2
votes
1answer
1k views

Add div to specific sub-menu

I researched in google, yandex but had no success. With this code I can set a div to sub-menu but this code add to all sub-menus, I just need to add div to specific sub-menu. class Megratron_div ...
0
votes
1answer
36 views

Adding toggle-able element after menu item

I've got this menu on my site: <ul id="menu-primary" class="offcanvas"> <li class="menu-item menu-item-has-children"> <a href="#">Parent</a> <ul class="...
0
votes
1answer
417 views

How to keep the plugin submenu open on viewing a custom version of users.php?

I have added to my-plugin submenu a custom view of the user list using users.php and a my_plugin_view argument to filter the request: add_submenu_page( "my-plugin", '...
0
votes
1answer
11 views

Submenu Page under Settings in Admin Panel

I have a quick question, I am wanting to add in a new submenu to the 'Tools' section on my Admin Panel but without modifying any of the original WordPress files such as (functions.php, etc..) files. ...
2
votes
1answer
388 views

Two Navigation Menus - secondary nav is including main nav

Two Navigation Menus in Themes Produce the same menus? reference the subject on page link above. i created two navs, yet the secondary nav includes all pages. the main nav is fine, but the secondary ...
2
votes
1answer
430 views

How to display dynamic content in start_lvl function

I am creating a custom nav walker but having trouble outputting parent menu item title in start_lvl function. I want to output it right after the <div class="dropdown"> in the following ...
0
votes
1answer
1k 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><...
1
vote
1answer
521 views

Add code to WordPress menu items by class

I am trying to add onclick="toggle_visibility('sub-menu');" into the opening tag of specific menu items generated in WordPress. I have used the following function to target all parent menu items ...
0
votes
1answer
19 views

Remove All in One Pack from the admin bar

Hello I want to remove All in One Pack from the admin bar. I can remove anything else but it. I have already removed other things like update from the admin bar using this method Get the menu's id ...
2
votes
3answers
9k views

Adding different classes to anchor in navigation menu

Is this possible? I want to add different classes to the anchors, so not the same on all anchors. How can I do this? PS: I am using this: function add_nav_class($output) { $output= ...
0
votes
1answer
397 views

Add a Submenu from Another Submenu in a Custom Theme

Good day everyone! I would like some help from you since I'm just a beginner in WordPress. I would like to add a submenu under another submenu like this: International China Independent Group Tours ...
4
votes
2answers
1k views

How Can I remove or hide the export page in WordPress menu?

I'm trying to remove the export.php page from WordPress admin menu -> tools for a multisite so only the network admin could see it I have the following code so far but can't get it to work. //******...
0
votes
1answer
13 views

Get Child of Child Pages in custom Menu

Got this bit of code which runs which gets the Page ID and displays all the children under it. Which is good. Part two of this is getting it to pull in the child of children items. So currently ...
2
votes
1answer
559 views

Automatically Add New Tags to Sub-menu

Been searching for any related plugins or info. about this case but didn't find anything relevant or working. I need every new tag that is added to a post automatically appear in a menu as a sub-menu ...
0
votes
0answers
9 views

How can I add plugins submenu at the toolbar on different roles in wordpress?

I want to add a menu at the toolbar of the backend wordpress but the problem is there is submenu on that plugin and also roles in it.
0
votes
0answers
14 views

Highlight “shop” in menu when on product page, without showing a sub-menu?

I've tried doing some research on this but can't get my head around it... I have one main menu where I want to highlight a page (named "Shop"), but don't want a dropdown menu with sub-pages (product ...
0
votes
1answer
630 views

Adding Meta Box to Specific Submenu Page

I've created this page: function wpdocs_register_my_setting() { add_submenu_page( 'edit.php?post_type=task', 'View Tasks', 'View Tasks', 'manage_options', '...
0
votes
0answers
10 views

Mega menu 3rd level sub menu overlapping with second level menu [duplicate]

i am created mega menu two levels worked fine 3rd level sub child menu overlapping with second level menu problem with Z-index my website url : http://3.9.10.5/ (3rd menu Treatments > Wrinkle ...
-1
votes
1answer
17 views

How to display a submenu as a popup when clicking a button?

I have a submenu that contains several items. The submenu currently displays when the user hovers over a main menu item in the top menu bar. I want to place a button in the middle of the page that, ...
0
votes
0answers
18 views

Placing custom post types as submenu in admin menu and moving additional admin elements around

So, in my custom Wordpress plugin I have two custom post types. My customer wants to have them grouped under one main admin navigation item. I go and create the main admin item using: add_menu_page(...
0
votes
1answer
3k views

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&...
-1
votes
2answers
77 views

How to keep close a sub-menu under homepage? [closed]

I am facing an issue in the Avada vertical menu when the homepage is opened. Please note that all "Home", "Company profile" and "Servizi" link to the same page (the homepage). The sub-menu under "...
0
votes
2answers
1k views

Insert & order custom post types in/as submenu

TLDR: While in the backend, I would like to add custom post type inside a menu page (which I can do). But I cannot order the resulting submenu pages. I have 3 custom post types “A”, “B”, “C”, and I ...
2
votes
2answers
6k views

Nav walker, bootstrap: Display 3rd level items under 2nd level

I am using the WP_bootstrap_navwalker for a dropdown menu. This works fine, but it only shows me the first and second level items. So de dropdown on the first level and a regular second item when ...
1
vote
0answers
53 views

Automatically list top level menu item child pages

I am building a website that has a lot of pages. The client is not a big fan of the Wordpress menu builder works (in appearance -> menus), and we have come to the conclusion that the best way for the ...
6
votes
7answers
20k views

how to create a menu with all sub categories?

Is it possible to create a menu with a category such that each time that I had a sub category that automatically display on the menu? As far as I know, if I have a menu with the category "fruit", and ...
8
votes
4answers
18k views

Remove Categories / Tags From Admin Menu

I want to remove or hide Categories / Tags submenu under Posts in the Admin Menu. I know this works with the themes submenus: remove_submenu_page( 'themes.php', 'widgets.php' ); The same doesn't ...
0
votes
1answer
2k views

How to display list of child pages with parent in wordpress?

I have following format of sub-pages in WordPress: About Us -Services -Products -Surgery I want to list all sub-pages with parent page like above but the code that I am using from ...
0
votes
0answers
14 views

How to Remove default Nav Menu Class and/or put my own class on menu li ul tag | no plugin

I want to remove this default class on ul li tag and want to add my own class ID <div class="menu"><ul> <li class="page_item page-item-58">About US</a></li> <li class=...
0
votes
2answers
73 views

Menu walker: how to tell if a sub menu contains submenus?

I mean: <ul> <li> <ul class="sub-menu"> <li> <ul> <li></li> <li></li> <li></li> ...
1
vote
4answers
4k views

How to get a separate child menu?

Didn't thought I would have to ask this question. But yes, it's true. It seems you can't have a separate child menu in Wordpress? I'm absolutely not a beginner on Wordpress. Have worked and developed ...
0
votes
3answers
997 views

edit-tags.php in plugin admin menu hides when is the active page

For the plugin I'm building I have added a submenu as a child to a custom main menu item in admin. The submenu page is an edit-tags.php page. This shows up as intended under the main menu item. When ...
0
votes
0answers
109 views

Displaying product thumbnail category on hover in menu

I need a submenu like this one: https://www.groupelacasse.com/ (products submenu) Where there's an image and products category. When a category link is hovered, its category thumbnail is displayed ...
0
votes
0answers
52 views

Filter parent_file doesn't working

I am trying to highlight an admin menu option (top level or submenu) but it just doesn't work. The code should be pretty straight forward but it seems that my filter isn't triggered. add_filter('...
0
votes
0answers
67 views

Native admin table with search functionality: sorting by columns does not work

I display a WP_List_Table on a submenu_page and offer a search function, which works. However, if I sort by a column within a search result, all records are displayed again. I really don't know why ...
0
votes
1answer
23 views

Creating navigation out of specific IDs and their children?

I'm looking for a way to list three specific pages in a nav-menu (I want to get these pages by their unique page ID's), and also list the children of these three pages - appended to each list item, in ...
0
votes
0answers
33 views

Display parent title in sub menu

I have this type of menu : Menu 1 Submenu 1 Subsubmenu 1 Subsubmenu 2 Subsubmenu 3 Submenu 2 Subsubmenu 1 Subsubmenu 2 Subsubmenu 3 Menu 2 ... I want to display, only in the submenu, the ...
0
votes
0answers
20 views

how to link local pages with flags in submenu

we have 4 flags on our website in the submenu. two, german and english are leading to the internal translation (wpml) the other two (chinese and russian) are leding to external links (local copies of ...
0
votes
0answers
18 views

How to remove parent menu item?

I have a menu, all sublisted listed under parent menu item 'home.' The issue is, I don't want a parent menu item. I just want menu bars - > click on it=drop down. At the moment I have 'home' - - > ...
0
votes
1answer
255 views

Adding sub-menu item makes parent item unclickable

Unfortunately, I do not have a way to reproduce this since I don't know what is causing the issue, but I can provide plenty of details. The problem is this: In the nav bar the parent menu item works ...