Questions tagged [sub-menu]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Bootstrap nav walker for wp_list_pages that includes dropdown links for child pages

I'm wanting to add a bootstrap menu to the sidebar that contains parent and child pages for a custom post type 'products'. I used the bootstrap walker I found here - https://gist.github.com/donchenko/...
0
votes
0answers
4 views

How to have sidebar menu that only display the submenu entries but not top menu entries?

Say I have a menu: Level 1 Level 2 Level 2.1 Level 2.2 Level 2.2.1 Level 2.3 Level 3 Then if I select any article within level 2, then the sidebar will display the menu for level 2. Is there a ...
0
votes
1answer
636 views

Change hover to onclick on menu

I've got a local website on WP using DIVI where a header menu got some "menu-item-has-children". In way to view these sub-menu, I just have to hover on it and when mouseout the sub-menu disappear. ...
0
votes
1answer
32 views

Why WP_Screeen doesn't show all options with admin_body_class

I was trying to add a specific class to the admin section. I created a new top-level menu page and now I want to add a specific class to this top-level menu and its submenu items. What I have tried so ...
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
10 views

retrieves menu and converts it to a readable array

I have added this code in function.php to retrieves menu and converts it to a readable array but It's not working and give me this warning. Warning : Invalid argument supplied for foreach() in C:\...
0
votes
0answers
83 views

Add a custom menu item to BuddyBoss Account Settings page

TIA - I'm relatively new to Wordpress/BuddyBoss so I'm a little lost. In BuddyBoss, when a User navigates to their Account Settings page there is a sub nav that gets loaded. I'm trying to add custom ...
0
votes
1answer
597 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
1k 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 ...
0
votes
1answer
685 views

Hide product categories and taxonomy terms in menu if empty

I've been researching this and had no luck so far. I have a WooCommerce store with a main menu showing product categories (product_cat) and brands (yith_product_brand) which is a custom taxonomy. I ...
0
votes
0answers
42 views

insert an HTML element if there is a submenu only

I am trying to insert an HTML element "an arrow or a checkbox" to make use of the "checkbox technique" so I can use it to expand the submenu "only if submenu is there" ...
0
votes
1answer
2k views

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

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 ...
1
vote
1answer
791 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 ...
2
votes
1answer
597 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
731 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 ...
3
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 ...
1
vote
0answers
2k 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
0answers
15 views

Admin submenu hidden on certain submenu pages

I've created a custom post type from a plugin. Then I added several submenu pages to its submenu list, like this: //categories add_submenu_page('Parent title', 'category_redirect', 'Categories', '...
3
votes
1answer
833 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 ...
6
votes
8answers
27k 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 ...
34
votes
2answers
53k views

Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu

I currently developing a wordpress plugin that is using two custom post types. What I want to know here: is it possible to add a custom post type menu as another custom post type's sub menu?
0
votes
1answer
908 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
2answers
824 views

How do you manage large menu hierarchies in WP?

Has anyone worked on sites where the menu hierarchies is fairly large? Not more than 3 levels deep, but more than 40+ menu items? If you only list first level items in the top menu without dropdowns ...
0
votes
0answers
12 views

Admin custom submenu element and current link css

I try to add a link in my woocommerce admin menu, this way manager can go directly to the "processing" orders part I manage to do it with the help of this function i created add_action( '...
0
votes
0answers
22 views

Toggle Sidebar Menu for Wordpress: How can I get the second click on parent to go to its link?

I created a sidebar toggle menu from this ancestor tree function. I am trying to make it so that when a parent item is clicked, it opens the submenu, and then only when the child menu is already open, ...
0
votes
0answers
20 views

Links doesnt appear as a submenu on a mobile

Help needed. I've puted some pages in the submenu. Works perfect on desktop On mobile the pages doesnt appear as a submenu for some reason Link
1
vote
1answer
580 views

Change submenu markup

I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own. The problem with this is that I would like to change the markup of the submenu and ...
0
votes
0answers
10 views

Creating sub-slugs without actual parent page

I would like to create individual pages for each member within a team: http://www.example.com/team/person-a http://www.example.com/team/person-b In the navigation menu I provide a parent entry ...
0
votes
0answers
13 views

Main Menu Appears But Sub Menu Does Not Appear

I have added the top menu code below as follows. Home page names are visible, but sub pages are not. How can I fix. $defaults = array( 'theme_location' => 'header-menu', ...
0
votes
0answers
10 views

Plugin Menu appears twice in Super Admin

I am buliding a plugin and have different menu options based on different user-role in wp-admin. I have user role as Administrator, Subscriber since lastweek we had migrated to Multisite Admin and we ...
4
votes
3answers
12k 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
105 views

MultiLevel Drop down is not working in Divi Theme with click or enter technique

I wanted to change the hover menu dropdown to click or enter for accessibility reasons. I am able to make the dropdown buttons work on a single level but not on multilevel meaning a dropdown menu is ...
1
vote
1answer
41 views

Position image widget in mega menu

I need to add image in mega menu. So I have added image widget in menu. How can I reposition this widget. Currently my menu is showing like this. But I need image only in the right side, and sub ...
0
votes
1answer
66 views

How to change the URL of sub menu page?

I'm trying to add a sub page under users in admin panel and everything works fine but I have a little problem when clicking on the created page the url changes and refer to my page as query string not ...
0
votes
0answers
19 views

Wordpress Nested Menu Items Wont Nest

I have a menu and just added some nested items but they're currently only showing in one row. Any ideas why they're not nesting even though they are nested in the Wordpress menu dashboard. Here's the ...
0
votes
0answers
379 views

Importing large product categories into wordpress menu

I have imported a product dataset into Wordpress/WooComerce which has created the required categories and sub-categories correctly when viewed in the Product->Categories page. When I go to try to ...
0
votes
1answer
19 views

How can I creat custom menu with bootstrap

I'm trying to create bootstrap collapsing navbar for WordPress template. I have to add some HTML properties such as data-toggle. After researching, I found that must customize the Walker class but ...
0
votes
0answers
16 views

Notices are render inside sub-menu's content

I develop a plugin but I've got a problem when I render sub-menus (added with the hook admin_menu). At the moment of the callback, I render the content with the following: <div class="wrap"> ...
0
votes
0answers
10 views

How to apply a class to nested sub-items of a menu?

I am trying to replicate this drop-down menu in a Wordpress theme: But I've spent my whole week to only get this result: (The sections items are properly handled, but their sub-items are a mess! "...
6
votes
2answers
11k views

Remove a menu item created by a plugin

I'm trying to remove a menu item and tried several approaches, but have not had any luck. It was created from a FAQ plugin. If I use this line: remove_menu_page( 'edit.php?post_type=question' ); ...
1
vote
0answers
35 views

Add toggle button for mobile sub-menus

Been playing with this for hours but not getting anywhere, please help! So I have a menu which works fine for the sub menu dropdown on desktop. What I want for mobile menus is for their to be an ...
0
votes
0answers
26 views

Menu sub-items not showing on mobile (understrap)

I'm building a website using understrap-child theme. I've got a navbar with a lot of items and sub-items (up to three levels). I've set the navbar depht to 0 since, according to the documentation, it ...
0
votes
1answer
22 views

wp_nav_menu container style args

I am trying to add CSS from a html theme that I included. When I add my primary menu function that I defined to load my menu section I don't know how to include CSS as it return a defult ul style. ...
1
vote
3answers
3k 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 ...
1
vote
0answers
23 views

disable menu collapse/expand function and make a menu item a static, unclickable text

In my side menu, I have this structure: Home Discussion |- Topic 1 |- Topic 2 |- Topic ... |- Topic N About us where Topic 1...N are sub-menu under "Discussion" and links to different pages. The ...
0
votes
0answers
52 views

Bootstrap Theme Migrated to WordPress

Looking for your expertise, as I'm fairly new using WordPress and I'm in the process of migrating bootstrap theme into it. Problem: I have a navigation menu in the header and want to have a ...
0
votes
2answers
1k views

get_the_post_thumbnail not working inside wp_get_nav_menu_items hook

if ( ! is_admin() ) { add_filter( 'wp_get_nav_menu_items', 'display_last_posts_for_menu_item_ts', 10, 3 ); } function display_last_posts_for_menu_item_ts( $items, $menu, $args ) { $menu_order = ...
0
votes
1answer
250 views

Wordpress + Bootstrap: Replace primary navigation menu on mobile?

So, I have a site that has a main navigation bar at the top and a secondary nav in the sidebar. The secondary nav includes the same links in the main nav but with dropdowns for the child pages. It ...
0
votes
1answer
150 views

How to add all subcategories as submenu in WordPress menu

I've more than 450+ WooCommerce product categories and subcategories. I want to add them all in the menu items, categories as a top level menu and subcategories as submenu. Is there any way to ...
0
votes
0answers
238 views

Theme: dropdown hover menu not showing up in IE/Edge

I'm using the theme Illdy, and the hoverable dropdown menus on the top navbar are not dropping down in IE or Edge. Firefox and Chrome appear to work. I've tried adding a variety of these to the ...

1
2 3 4 5
7