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
17 views

Main menu nav items in custom post archive page

I have a strange bug in my custom post type archive page, in the main menu not getting the correct title and it takes the last title of post item however the urls are correct on top it's the main ...
0
votes
0answers
22 views

Custom menu with additional logic for display

I want to register new wp menu, named hub-menu register_nav_menus(array( ... 'hub-menu' => 'Hub')); Structure of that menu is as follows: **Hub Menu** Hub 1 |_ Spoke 1 |_ ...
0
votes
0answers
10 views

Menu item that hides when you click the previous submenu

I have a problem on the menu of this site: http://gabriellevinson.fr/. Notably with the project submenu and the contact link. Indeed, when I click on the arrow next to the project, the contact link ...
1
vote
0answers
21 views

Trying to Create Menu in Wordpress

I have been trying to create a mega menu on the WordPress website. The problem that I am facing is not able to create a mega drop-down for different services. What I want to create is: When should I ...
0
votes
0answers
14 views

Event listener callback returns undefined element

i am making a mobile menu for wordpress theme and have a issue where the element I am selecting returns undefined when the click event listener callback is called. But in constructor you can see that ...
1
vote
0answers
10 views

Adding an Avatar to the Top Nav Bar

I am attempting to add an avatar image to the top nav menu. I am currently using this function, which takes a custom link and replaces it with the currently logged in user's name. That part of the ...
0
votes
1answer
22 views

Adding markup to sub menu based on class

I would like to add a div at the after a sub menu. I would like to apply this change only if the parent menu item has a class name of product-menu (comes from CSS class field under menus section in WP ...
1
vote
0answers
22 views

WP Menu Walker - How to know total depth from inside the start_lvl() method

The start_lvl() method allows to know the current $depth parameter. But, I need to output different results at level 1 if the menu has x or y total levels. I did a print_r() of the $args array, but ...
1
vote
1answer
11 views

wp-admin is blocking my mobile menu icon [closed]

My wp-admin bar blocks my mobile menu. How do I prevent that from happening? It forces me to have a top margin that I don't want when users are not signed in. Here's what it looks like when users are ...
0
votes
0answers
10 views

Featured image in menu wordpres

the following is working good, but it breaks down if you activate wpml, do you have any idea how to surpass that? function ad_filter_menu($sorted_menu_objects, $args) { if ($args->menu != 32) ...
0
votes
0answers
12 views

Wordpress menu items automatically becoming empty custom links

I have a WP site and recently my nav/menu got screwed up. In the admin, I see all my menu items got automatically converted to empty menu items. Here is the screenshot: I came across this question ...
0
votes
0answers
41 views

Help with Wordpress Custom Nav Walker

I want to convert my navigation menu in custom wordpress theme, I have created the design using html/css and now for the naviation bar I want to make it dynamic so it can be manipulated from wordpress ...
0
votes
0answers
17 views

Why is my navigation in my onepage not working?

I have a one-pager who has two sites. One is German and the other English. I made an own navigation for the English one, but it doesn't work. The navigation is throwing me back to the German one. The ...
1
vote
1answer
18 views

url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB

I am using the walker class to create my custom mega menu, and using it to display post thumbnails at a menu depth of 2. It seems using the url_to_postid method seems to be causing a high ttfb of >...
0
votes
1answer
23 views

Display posts by alphabetical order

I just purchased a WordPress theme. I’m trying to sort post on one category into an alphabetical listing (glossary type of listing). Example : https://www.udiscovermusic.com/browse-artists/ There are ...
0
votes
0answers
12 views

Add image to wp menu?

I am using the default menu in WP, and now after installing the plugin Menu Icons by ThemeIsle Icons doesn't show in the menu. I am able to add a menu icon in the dashboard. I changed styling a bit ...
0
votes
0answers
18 views

Menu not showing on landing page edited with elementor

My menu is not showing on the landing page for my website but it is on all of the other pages. www.hungrytinyhumans.com. I used elementor to build the page.
0
votes
0answers
15 views

Admin menu in different languages

My Wordpress admin language is partially in English and partially in Dutch. This causes some things (like events) to show in English on the site, which is not supposed to happen. I used 'admin menu ...
1
vote
1answer
13 views

Change the direction of Opening the Sub-Sub Menu in WordPress?

I was making a WordPress website and all of a sudden I ran into a problem Like I have a menu at the top and there link called "More Pages" and in it, there is a link called "useful ...
0
votes
0answers
18 views

Navigation Switcher functionality with button ( not language switcher )

I have a WordPress site that has a switcher button that needs to switch navigation between regular and expert visitors. I want the regular visitors not to see some navigation items. As both, the ...
0
votes
1answer
34 views

How to make only the valid active page of a multilevel menu active with - ".nav li.current-menu-item a"?

Why, if I write - .nav li.current-menu-item a {}, then all items in the submenu of the active page will be highlighted, how can I make sure that only the really active item is highlighted? If I write ...
0
votes
0answers
12 views

Where the additonal contents in the expanded menu item come from?

I am studying the header.php for my website, where I find the following codes: <?php if ( has_nav_menu( 'primary-menu' ) ) : ?> <nav class="main-navigation desktop-nav" ...
1
vote
1answer
20 views

Second Set of Eyes: One custom taxonomy shows in Appearance > Menus, one does not

I presume this is a scenario where I've overlooked something in syntax, or a basic setting. But I've looked it over so many times I need fresh eyes. I have the following code which adds a Product CPT, ...
0
votes
2answers
35 views

Looking replicate static HTML Menu into WordPress Dynamic Menu [closed]

We are converting our static HTML site to Wordpress. The conversion is going fine (for the most part) but the part I cannot figure out is how to build the menu so that I can retain the menu look from ...
1
vote
0answers
27 views

Filtering Only a Specific Menu using the “add_additional_class_in_li”?

Thanks to some help on here, I've managed to add bootstrap classes in main navigation li tag by adding this to my theme's functions.php // adding css to li tags for menu styling function ...
1
vote
0answers
17 views

How do I add recent posts to the menu?

How to add recents posts to the menu? Entries with pictures. "Menu-item-object-custom" items in a div container? What I have now is: header.php wp_nav_menu( array( '...
0
votes
1answer
49 views

How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?

I'm working on the WordPress where I have multiple custom post type, but I want to know How we can create menu and use as a add-submenu-page for admin menu? I want to create add menus from Appearance &...
0
votes
0answers
7 views

Menu Item custom radio button field show results based on value (Advanced custom field plugin)

I have a custom field (radio button) for all menu items for a menu just as follows. https://i.ibb.co/0Fyxnn3/1.png this field is mainly there to users to define a whether a menu item is a mega menu or ...
0
votes
0answers
12 views

Exporting & Importing Customizer Menu Page Structure

I need to update a production site with changes I made on a staging site's menu structure. On the staging site I reorganized the menu in Appearance > Customize > Menus. What table in the ...
0
votes
0answers
22 views

Im having trouble centering menu items in footer due to "flexbox"

New to WordPress development, long-time user though. Developing my own site. Have a rudimentary understanding of HTML / CSS. I'm using 2020 / twenty-twenty theme (child) and the main problem I'm ...
0
votes
1answer
10 views

Custom link missing as option in my 'add menu items'

Have taken over as admin on a site and there doesn;t seem to be the option in the menu option for adding a custom link. Not sure why anyone would have wanted to hide it, but if they have where would i ...
0
votes
0answers
29 views

Add menu class in wp_nav_menu <span> and list

I'm trying to convert HTML template to a wordpress. Now I'm trying to add a class to the elements of ul, li and in my wordpress wp_nav_menu. This is what the HTML menu looks like: <ul class="...
0
votes
0answers
18 views

Disguise Multi-Page site as Single Page

I'm building a site that needs the audio element on the page to be persistent and keep playing when the user clicks on any navigation item. It's located in the header so I want that to be sticky too. ...
0
votes
0answers
13 views

How to disable autosave of menu-description?

enter menu description, click on cancel, reopen menu item, description will be there, however class and other stuffs are not getting saved. How to disable autosave for description too?
0
votes
1answer
27 views

Add prefix to url, but products not showing in page SHOP

I have managed to add a prefix in the url of my site, now my site allows entering the Shop page with these two urls: misitio.com/tienda and with the prefix: misitio.com/us/tienda When I enter with the ...
0
votes
0answers
11 views

When created sub-directory, can we create a new navbar?

I want to create a new sub directory for my wordpress website. But I will do this for second language option. I watched some videos and I saw that we can create new posts and pages but I didn't see ...
1
vote
1answer
25 views

Excluding a media query from specific pages

I have built a media query for Twenty Twenty-One that makes the mobile menu appear for screens widths up to 1023px. (My CSS is below for those interested, I think it should be pretty universal.) ...
0
votes
0answers
13 views

How add counter bubbles to main menu (NOT ADMIN MENU)?

First things first: I am a newbie, so if you're scared off by now: Bye, Bye :-D To the rest I'd like to address this issue: I have searched extensively but couldn't find any answer to my question to ...
1
vote
1answer
25 views

how to create/register menu items that can be added to menus later

I noticed some popular plugins (i.e woocommerce as in the image below) have their own "menu items" that can be added to any menu. how can I create my own ? I checked the entire theme ...
0
votes
0answers
19 views

Navigation item - current date in url

I need to create a navigation item with custom URL (Food) with url (https://domain.com/food-menu/{current-date}. How can I do that ?
0
votes
1answer
17 views

Custom CSS Nav Menu Style Not Being Applied

I have created a plugin and custom CSS page to display a custom navigation menu on one page of my WordPress site. I am attempting to show the navigation menu using a Custom HTML block on the page of ...
0
votes
0answers
25 views

How do I convert this code to dynamic WordPress navbar without losing the CSS styles?

Here is the sample HTML code: <ul> <li><a href="#">Home </a></li> <li class="menu-dropdown"><a href="#">Supplies <i ...
0
votes
1answer
82 views

Trying to add a custom social icon to a Twenty Twenty-One child theme

I am trying to add an icon to the Twenty Twenty-One social icons, but having trouble registering it. This support article refers to a Themes field guide for WordPress 5.5 which gives instructions on ...
1
vote
0answers
23 views

Displaying primary nav menu two ways

Trying to modify the Twenty Twenty-One main menu. Given a main nav menu such as: Name of organization (links to home page) About Etc... For default behavior (on most pages other than home page), we ...
0
votes
0answers
17 views

Mobile navigation javascript problem

I've spend a better part of a day trying to get a mobile menu to work on my Wordpress site. The hamburger menu appears fine, but unlike another site I used this menu on, this one doesn't work. I'm ...
0
votes
0answers
10 views

Change Background Menu when Click Icon Menu

I'm using Elementor. Want to change the BG Color when clicking the Icon. The White BG color Will Change with the Menu BG color
0
votes
1answer
41 views

Add Different Class on Different Ul in twenty-twentyone theme

I'm creating a custom menu with wp_nav_menu. I want to add different classes on menu and submenu which are coming under different li, but unable to find a solution. Can anyone help me to figure out ...
0
votes
1answer
21 views

How to highlight 1st level menu item based on actual page

I am trying to highlight 1st level menu item by adding 'current-menu-item' class using nav_menu_css_class filter based on actual page / article / post / etc. For example, menu looks like this: ...
1
vote
1answer
23 views

Can I insert elements anywhere into the results of wp_nav_menu()?

I know that it's easy to add something to the end of a navigation menu using code like the below: function add_last_nav_item($items) { return $items .= '<li><a href="#myModal" ...
0
votes
0answers
32 views

How to create a link-less parent (top level) menu item that doesn't use an anchor <a> tag

My question is closely related to this one: How make top level menu item not have link, but have sub-menus that are linked? When I create menu items with the style customizer, every menu item gets ...

1
2 3 4 5
63