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
1
vote
0answers
12 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
22 views

Looking replicate static HTML Menu into WordPress Dynamic Menu

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 ...
0
votes
0answers
22 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 ...
0
votes
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
47 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
6 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
8 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
18 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
26 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
22 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
11 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
22 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
18 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
16 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
8 views

Is there a way to ask for help or information on a pre-existing discussion without breaking any rules? [closed]

I think this exchange may hold an answer to my problem, but I haven't been able to query the participants. Can someone tell me how to implement this and/or where to paste the code? wp_nav_menu not ...
0
votes
0answers
23 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
48 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
16 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
9 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
38 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
20 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
26 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 ...
0
votes
1answer
21 views

insert div into a menu item before the link and more

I make a web page in Wordpress using a certain theme. Now, this theme has an expected markup for the menus: <ul id=”primary-navigation-main”> <li> <a href=”https://example....
1
vote
1answer
32 views

Conditional secondary menus

I have a main menu of 3 items, and for each of these I have a different secondary menu. I would like to show the related secondary menu on each page. I currently used is_page with slug. I will need to ...
1
vote
0answers
21 views

Multisite: menus can't be added in child sites

It seems that we cannot add menus in child sites in multisite. Did anyone face this issue before? I have the Menu container enabled in my functions.php register_nav_menus( array( 'primary-...
3
votes
1answer
24 views

Automatically add product_categories to nav_menu

I've been googling around about days working for a client and would like that every time they add a product_category, it should get automatically added as a sub-menu item in the Primary navigation ...
1
vote
0answers
21 views

how to make accessible menu with WordPress for those people with disabilities?

i want to develop a wordpress navigation with default wp_nav_menu() but i am succeeded yet. i tried a lot of example and tips but its not match the requirement, sometimes i got solution in such its ...
0
votes
0answers
20 views

Custom menu - Check if current page is third level sub page

I'm building a custom menu* and I have run into issues with making sure the sub-menu's is expanded when I visit pages 2-3 levels deep. *(or rather I kinda inherited a custom menu and is now asked to ...
0
votes
1answer
25 views

The menu item is not deleted on WordPress

Doing a WP project and stumbling over commonplace things. The menu item is not deleted. Video demonstrate this problem What could be the reason?
0
votes
0answers
34 views

How to only show current parent menu item and it's sub-menu children in sidebar per page

I have a sidebar area, not an actual sidebar but side area where I am pulling in a menu using wp_nav_menu. Is there a way to only show the parent menu item and it's sub-menu items for each page? I ...
0
votes
0answers
14 views

Logo above menu

Good afternoon, everyone! I'm busy with my friend's website and have already used a lot of CSS, only I get stuck on the following. I would like to put the logo above the menu. So not the logo in the ...
1
vote
1answer
37 views

How to add ID attribute to each submenu?

I would like to add an ID attribute to each list <ul> submenu. I am using the Walker class extension. I have managed to modify some elements, but I am left to solve this one problem. I need the ...
0
votes
2answers
8 views

Custom menu including also primary menu items

I just would like to show my "footer menu" only with the two pages I manually added in appearance section: register_nav_menu('footer', 'Footer menu'); but when loading in the footer: {!! ...
1
vote
0answers
26 views

Easiest way to add dropdown to a page

I am trying to add a dropdown menu to my page (not menu or widget section) and once the user selects an item from that menu, it redirects to a specific page. I have tried using the block editor, but ...
0
votes
0answers
56 views

How to remove empty menu space when creating admin page without menu title using add_submenu_page

I have added few pages to handle edit, view page that is should not be accessed from wp-admin navigation menu and its a success. But now on my menu, I have empty space as sub-menu. Below are my codes ...
0
votes
0answers
9 views

Completely hide page from wordpress dashboard

I develop a plugin which create its pages: login, form, admin area. Creating pages done, these pages are available under Pages and Appearance/Menus. I would like to hide for example admin page ...
0
votes
0answers
15 views

Displaying Desktop Menu On Mobile

So Before I Get Downvoted, I Read 5-6 Post Regarding This Issue. But None Of Them Can Solve My Issue. In This Theme, There Is Two Menu And When On Mobile View, The Hamburger Menu Appears. I Would Like ...
0
votes
0answers
11 views

How to add an archive page to WordPress menus (nav_menu)?

Isn't there any way to add relative link like archive page (eg "host/fruits/") of a custom post type I added? (Just as it works "host/fruits/apple/").
0
votes
1answer
15 views

Menu separator appearing on next line

I am creating a new theme, but for some reason the menu isn't displaying correctly. I want the separator to appear next to the menu items, but they are on the next line for some reason. This is what I ...
0
votes
0answers
22 views

Bootstrap Navigation

<div class="mobile-menu"> <ul id="mobile-menu" class="menu"> <li class="dropdown"> ...
0
votes
1answer
11 views

Menu items not clickable

Our website is chinesealpha.com All of a sudden, our menu items are non-clickable. Does any of you have an idea how to resolve this? I tried re-configuring the menu list, doens't work... Thanks in ...
0
votes
0answers
48 views

Mobile Menu and Mobile Sidebar missing

My mobile menu and mobile sidebars are not working. When I click on the icon it only adds a # sign to the url and nothing happens. I have deactivated all the plugins and activated them one by one. The ...
1
vote
0answers
15 views

Wordpress warning: “private_to_published” Deprecated when creating nav with wp_update_nav_menu_item()

For reasons specific to how my local development environment generates Wordpress menu items, I am trying to programmatically create a menu using wp_create_nav_menu() and wp_update_nav_menu_item(). My ...

1
2 3 4 5
63