The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [menus]

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.

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

Custom link in main navigation breaks repeatedly

I have a weird glitch on a site I do some maintenance for, trying to figure out the source of the problem, The site is https://www.sosiologia.fi, and it has a menu that's a combination of internal ...
0
votes
0answers
8 views

ACF field in menu but outside menu wrap

I am trying acf in menu for but the problem is that i want to call its value outside the items_wrap separately also is there any other way than creating hook in functions.php , i search a lot but didn'...
0
votes
1answer
19 views

What is inside in $item in start_el function in Walker_Nav_Menu class

I want to know what are exactly inside the $item in start_el function in Walker Class. Thanks in advance
0
votes
0answers
11 views

How to render main header navigation bar across all WordPress pages

I am building a theme using the Highend plugin in WordPress. In Highend Options > Logo Settings in WP dashboard, I overrode the default logo to implement a custom logo. This new logo appears to render ...
0
votes
0answers
23 views

Multi-Level Nav Bar

Is there anyone here with a sample code for using walker class with multi-level function. I have a Nav walker class but it seems that it can only traversed to first element like this: <ul> &...
-1
votes
0answers
13 views

Drop Down menu expanded by default in Divi

It's possible make the Drop Down menu expanded by default in divi? I'm using the fullscreen menu, and i want to have the drop down menu expanded by default.
0
votes
0answers
13 views

Move submenu in the fullscreen Divi menu in Wordpress

I need to move the language submenu, it's a secondary menu, but when i use the fullscreen menu, the main menu and the secondary menu merge together. Is there any method to aislate the language menu?
0
votes
0answers
22 views

How to make Logout Link consistently appear on all web pages?

I am using the following code to add Log In and Log Out links in the Primary Menu. Can't give a web link because the site is still under construction. //* Add a Login/Logout toggle item in WordPress ...
0
votes
0answers
47 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
1answer
20 views

How do I scope out why I have two “posts” menus in an admin?

A site I'm working on has an odd problem: two sets of "posts" menus in the admin. The client brought me on board and says "it's been there a while". How would I go about finding out why there are two ...
0
votes
1answer
14 views

How To Add The Help Scout javascript LiveChat from the WordPress menu

My client wants to add the live chat script code from here website, but he wants it to put on the specific menu /contact-menu/ I'm not how I could implement it. please let me know any thoughts about ...
0
votes
0answers
4 views

Drop down menus for all available pages/posts

I need several drop down menus to appear next to some text. I am very new to WordPress development so bare with me. I only have the HTML part of the code and I'm not so sure about how to add the ...
0
votes
0answers
13 views

WP-CLI command to rename menu?

Do you know a wp-cli way to rename menus? I don't see any reference to that in the documentation. Tried wp menu: usage: wp menu create <menu-name> [--porcelain] or: wp menu delete <menu&...
0
votes
1answer
30 views

How can I make a WordPress sub-menu with a top-level that isn't clickable?

My WordPress website has a "Social Media" menu. When using a touchscreen, when you tap the button, it takes you to a page. Only the little down-arrow next to it opens up the menu. This is because ...
0
votes
1answer
29 views

How to avoid a duplicate query from using wp_nav_menu?

My theme need to render 2 menus in homepage. The rest pages only need one. As result is only homepage got duplicate query warning. After tracking down, I found out this was cause by wp_nav_menu. How ...
3
votes
1answer
49 views

What does a walker menu mean?

I don't understand what is a walker menu in wp_nav_menu() function means. The document doesn't say much about it. What does it looks like in graphic or HTML?
0
votes
1answer
16 views

Add image to menu item with AFC

I'm trying to add an image to menu item, can't get it to work. Here is my code. header.php <?php wp_nav_menu( array( 'theme_location' => 'side-...
0
votes
1answer
12 views

Scroll to ID broken in main menu

I've taken over the task to maintain the website of your orchestra. Unfortunately the previous maintainer installed quite a lot plugins so it's hard for me to figure out which plugin is actually used ...
0
votes
1answer
29 views

Show some menu sub items as dropdown under a menu item

I have made a custom wordpress menu - function my_custom_menu_item($items, $args) { if(is_user_logged_in() && $args->theme_location == 'primary') { $user=...
0
votes
0answers
34 views

Adding a drop-down (select tag) option under Menu Settings in WordPress Admin

I looked (surfed) around a lot to get idea of how can I add custom field/drop-down under "Menu Settings" in WordPress Admin. I want a select tag with options from which I can get value based on the ...
-2
votes
0answers
16 views

porto theme responsive menu toggle not working

i have use porto theme and my theme version is 5.0.1 Desktop menu working fine but in responsive menu when i click on toggle button still not working for me i have try to add custom jquery in ...
0
votes
0answers
11 views

I want to print categories and sub-categories and so on

I want to print categories and sub-categories and so on in way that it looks like. cat1 cat2 cat3 cat1.1 cat 1.2 cat 1.3 cat1.1.1 cat1.2.1 cat1.3.1 It looks like menu I have ...
0
votes
1answer
21 views

Remove unwanted elements for a wp_nav_menu

I am working on building a custom mega menu within Wordpress.I am running into an issue with unwanted elements being displayed from wp_nav_menu which are distorting my menu. <?php wp_nav_menu( ...
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
0answers
10 views

Making drop down menu images the same dimensions as others?

I am working with a website which had been previously professionally designed. On the drop down menu, they had attached images (seemingly without a plugin) of a certain size. None of the image ...
0
votes
1answer
13 views

Adding additional html to the end of the root level in a custom nav walker

I have a custom nav walker, which essentially just add's new classes to the menu, however, my menu also contains some hard coded elements at the end (Contact button & Search Icon). Where/How to ...
0
votes
1answer
22 views

Does the Default theme of Wordpress like 2016, 2017 and 2019 uses Walker_Nav_Menu Class

I want to know if these themes uses Walker_Nav_Menu class. As I open the files I can't see a Walker_Nav_Class or I could not find it. And I want to know what they use to display the Menu and Submenus. ...
1
vote
0answers
22 views

Custom Nav Walker Trouble

I got a snippet for a custom nav walker online and it works fine for the main menu items. I can't figure out how to get it to work for the sub-menu items. This is what i'm trying to achieve: <ul ...
0
votes
0answers
10 views

Sub Menu does not display using Nav Walker

I have a submenu and I put a nav walker from a github source and my submenu does not display. Here is my code in header.php <nav class="navbar navbar-expand-md navbar-light bg-light" role="...
0
votes
0answers
5 views

Menu doesn't collapse after choosing menu item (mobile only)

I have a problem with my menu on mobile. After selecting the item I want from the menu, it doesn't collapse and I have to manually click on the "x" to close it. I am trying to fix with this jquery: ...
0
votes
1answer
33 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
1answer
162 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
1answer
33 views

How to add css to single navigation text? [closed]

I only want to edit the "ticket". in the photo I only add the CSS in the inspect. I want it to be that size.how to put CSS in that span ?? I did add extra CSS class in the menu. but it only changes ...
0
votes
1answer
21 views

Create survey that redirects to sidebar menu customized to answers

EXPLAINED: I want to create a survey for my users about who they are and what they most want to get out of my services. After the survey is completed I would like the users to be redirected to a page ...
0
votes
1answer
15 views

Get Current Menu Location inside Nav_Walker

How can I retrieve the current menu location (as registered with register_nav_menus) from inside a nav-walker class? eg: <?php class Special_Nav_Walker extends Walker_Nav_Menu { // How can ...
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 ...
0
votes
0answers
11 views

Header Navmenu glitching in Chrome (but not other browsers)

My website, https://bthsensor.com has been experiecning a certain glitch on the chrome browser specifically. The header navigation menu jumps from its assigned position when the cursor hovers over it. ...
0
votes
1answer
22 views

How to use Bootstrap Navbar in wordpress Nav Menu

Here is my code. <?php wp_nav_menu(array('theme_location => 'primary',)); ?> How to format the code in my header.php using the bootstrap navbar? I am using bootstrap 4.3x. I am new to ...
0
votes
1answer
23 views

My Temptation theme is showing two of the same menu at the top. How do I remove the one that the theme comes with? Please help! [closed]

I've tried the CSS that someone else posted but it didn't work. I can't find the option to remove one of the menus. It's not showing on mobile, but it shows up on the desktop site. My website is www....
0
votes
0answers
17 views

How to customize the HTML within dropdown menu items

I've been investigating and have found numerous ways of creating a custom menu in Wordpress with the ability to target the existing HTML output elements with CSS classes, but what I'd like to do is ...
0
votes
1answer
28 views

Wordpress category title not update in navigation menu

I have simple situation but can't get the right answer and solution Problem: for example my woocommerce category name “soup, noodle & pasta” I add this category in my menu and after that will ...
0
votes
1answer
10 views

wp_nav_menu seems to be printing the wrong menu

I'm learning WordPress and I'm can't understand what I'm doing wrong with a theme I'm creating. Here is how I create my menus in the functions.php file function my_custom_theme_setup() { ...
0
votes
1answer
12 views

how to display different menu according to postid?

I am searching for a way to display a different menu according to postID: ex: if ($post->ID == 2309) { displayMenu("menu2"); } I am using Avada and looked into header.php with no success.
0
votes
0answers
26 views

wordpress custom menu - show parents, siblings, children depending on depth

looking and trying for hours to find a solution for the following output of a wordpress custom menu. Hope you can help. I do not know where to start: custom menu walker, css, functions.php I have a ...
0
votes
0answers
10 views

Function add class to second menu specific items if the page has a certain category

I would need to set a class of a secondary menu if the currently loaded page has, for example, the category "clients". For different primary menus I will use https://en.wordpress.org/plugins/...
0
votes
1answer
64 views

List a maximum of ‘x’ product categories with qty of ‘y’ in each column

Im trying to list a maximum of ‘x’ product categories (a multiple of y) with a qty of ‘y’ in each column. ‘x’ decides how many columns are displayed. What I am trying to do: - If there are less ...
0
votes
1answer
117 views

Display WooCommerce product categories in a 4 columns custom menu [closed]

I'm trying to list a set amount of product categories (x) in a dropdown menu, but if the total amount of product categories are greater than x then only list x minus 1 and display “view all categories”...
0
votes
1answer
11 views

add_theme_support( $feature='menus' )

I want to ask why after I deleted the add_theme_support($feature='menus') in my functions.php there is still menus in my theme activated. why it is still there even if I did not write the ...
0
votes
1answer
8 views

How can I order these pages in this navigation bar on this old wordpress theme?

It's using a superceded theme with no support. Even so, the theme has been working great for about a decade... Here is the site: https://www.vertebr.ae There is no menu to organise in the ...
0
votes
1answer
11 views

How to add a template - so that i can choose a different menu for some pages

Hi I would like to know how I can add a template just to choose a different menu for some pages, Any help appreciated!