Questions tagged [sub-menu]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
76 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
24 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
39 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
19 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
286 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 ...
0
votes
0answers
131 views

Product categories are not showing up completely

I have used Bulkpress plugin to be able to upload 700+ product categories. Now I wanted to create menu item 'Apple' and there will be a dropdown with all the Apple models (subcategories) listed once ...
0
votes
0answers
72 views

Make submenu stay open until other menu item is hovered with submenu's

I want to create a menu with a submenu in my wordpress site like this website has done: https://www.opmaatzagen.nl/ When you hover a menu-item a submenu is becoming active and stays active until you ...
0
votes
0answers
34 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
33 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
60 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
64 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 '...
1
vote
2answers
4k views

Add items to a menu dynamically

I'm doing a site in WP with dynamic and static content. I'd create the menu from the admin panel. I have 5 sections (Home, about, Boats, News(blog), contact). I'd create a custom post type with new ...
0
votes
2answers
259 views

Creating menu always gives error A name is required for this term

I have 2 menus. Main Navigation Footer Navigation And 3 locations: Top Bar Navigation Main Navigation Footer Navigation If I try to create a new menu, wp displays error A name is required for ...
1
vote
1answer
2k 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
20 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....
1
vote
2answers
2k views

Custom Walker for Walker_Nav_Menu

I'm trying to add a custom menu structure for my WordPress theme. This is how I want it to look: <li> <a href="link_to_parent_item" class="main-category" tabindex="3">Parent Name</...
2
votes
2answers
566 views

how to only add a top-level admin menu without it creating a sub-level-menu

Here is a the code snippet: add_action( 'admin_menu', 'travel_site' ); function travel_site(){ add_menu_page( 'Travel Site Menu', 'Travel Site', 'manage_options', 'travel-site-menu', '...
3
votes
1answer
2k views

Customizing the a tag with Semantic UI

I'd like to use Semantic UI to aid development of a Wordpress template for a project. For a submenu I intend to use one of the Secondary sub menus found just at the bottom of the Pointing section. ...
7
votes
2answers
12k views

Add an admin page, but don't show it on the admin menu

I have a custom plugin 'Charts' that has it's own menu. In that menu are links to the 3 pages for the plugin - 'Charts', 'Add Chart' and 'Edit Chart'. However, I don't want to display the link to '...
0
votes
1answer
69 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
730 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
0answers
35 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.
0
votes
1answer
16 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 ...
3
votes
2answers
21k views

How show sub menu only using wp_nav_menu()

I am using this code to show the custom menu subpages if you are on the parent page. But what this code also shows is a parent page on a page that has no sub menu, which I would like hidden. Basically ...
1
vote
0answers
444 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. ...
28
votes
2answers
43k 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
0answers
912 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
212 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
1answer
43 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 ...
0
votes
1answer
38 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 ...
2
votes
3answers
2k 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
128 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
2answers
261 views

Wordpress Remove Submenus

I found an answered question here Remove menus and submenus 2 Answers for my problem but is there a way of changing the code a bit so that it removed the submenus for all Editor roles. not only for ...
1
vote
1answer
902 views

Main Menu and Sub Menu Items for Footer

So I'm currently trying to figure out how to display both my main menu items and my submenu items separately in my footer. I want to display them both in separate columns (bootstrap) and am having ...
1
vote
0answers
106 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
148 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
208 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
1answer
176 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
202 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
1k 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
1answer
58 views

How can i create menu like in the example?

i try to create menu loop with structure like below, but i cant, default function wp_nav_menu doesn't allow to do that, i don't understand hot to do it. I need structure like in example with data-...
0
votes
2answers
2k views

How I can add div to menu?

I have div structure <div class = 'main-menu'> <ul class = 'menu'> <li class = 'item1'></li> <li class = 'item2'></li> </ul> </div> But I want ...
0
votes
1answer
346 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
1answer
231 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
108 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
2answers
56 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
453 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
1k 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 ...
2
votes
1answer
2k 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-...