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

How to add an eventlistener to close menu toggle

I have a toggle button in my Navbar (header) which when toggled opens up a full screen menu. When the button is toggled (active), the button's icon changes from hamburger-bars to a cross, and when the ...
0
votes
0answers
13 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 ...
0
votes
0answers
9 views

Max Mega Menu Unique Tab Customization

I'm trying to change the colour of a single tab within my megamenu and I can't get the CSS to work. what I've got at the minute. #{$mega-menu-item-4527} { background-color: #4f3d91; } The ...
1
vote
0answers
19 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
19 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
11 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
13 views

Using Post Grid For Specific Category Posts Without Creating Pages for that Category

So I divided my posts into four specific categories. Now I used a simple href code, copied the category ID, and created hyperlinks to those specific categories from the main page. Now, basically, when ...
0
votes
0answers
15 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
22 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
10 views

menus in 2021 theme - problem with dropdown

I am seeing something I never have before in a menu that has a child. There is a +- icon that shows in all browsers. I dont have any special menu plug ins or anything special and am using the 2021 ...
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
12 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
32 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
25 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
55 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
1answer
27 views

Different front page for logged in and logged out user but the same URL in Wordpress

I have two home pages created in WP. One is set as the front page but for only logged-out users. For logged-in users, they see home page 2 as their home page. However, I want the URL for logged-in ...
0
votes
0answers
13 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
11 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
21 views

Bootstrap Navigation

<div class="mobile-menu"> <ul id="mobile-menu" class="menu"> <li class="dropdown"> ...
0
votes
1answer
10 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
19 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 ...
0
votes
0answers
10 views

Menu items not found on category or tag page

I have the following menu call in the header.php file <nav id="site-navigation" class="navigation main-navigation" role="navigation"> <?php wp_nav_menu( ...
0
votes
0answers
18 views

How to loop nav menu items in WordPress menu Walker?

I want to loop every single item in the menu with the walker class. class Primary_Walker_Nav_Menu extends Walker_Nav_Menu { public $bg; function __construct() { $this->bg = ...
0
votes
0answers
22 views

Replace jQuery with PHP or CSS for Customized WordPress wp_nav_menu

Does anyone know how to build a custom wp_nav_menu layout without using jQuery? My current menu loads fine, but it causes the whole page to shift. jQuery adds CSS classes to items in the menu after it'...
0
votes
2answers
44 views

add another html tag after li element in wp_nav_menu

I have a nav menu in footer. I just want to display it side by a <p> tag, I mean something like this <ul> <li> <p>copyright C 2021</p> </li> <li> contact </...
0
votes
2answers
101 views

Add a counter beside menu item label

I'm using the following code to add a panel to the admin menu screen, so the users are able to add a Cart link to their menus: function my_add_meta_box() { add_meta_box( 'custom-meta-box', __( '...
0
votes
1answer
18 views

Get Each Menu Nav Label of Menus in HTML tag

I have footer menus built with wp_nav_menu using code below: wp_nav_menu( array( 'container' => '', 'depth' => 1, 'items_wrap' => '%3$s', '...
0
votes
0answers
21 views

Nav Bar icon not working after click

My navbar icon is not working after a click. Here is the website. The icon is in the upper right corner. Any ideas?
0
votes
0answers
21 views

Prevent square brackets in Custom Links menu item converting to ASCII code?

I need to set up numerous Custom Links in a menu. The URLs have square brackets in them. Upon saving the menu, WordPress is encoding the square brackets into ASCII codes. I'd rather it didn't, as it's ...
0
votes
0answers
10 views

What's next after created translated posts?

I've just installed WordPress in : mydomainname.com/blog directory. (my domainname.com/index.php is not using WordPress). I've created 3 posts in my local language. (say, post-1, post-2, post-3). In ...
0
votes
0answers
12 views

Add a current user/author post to sub menu

I wish to add a current user's custom post to a navigation sub menu. I have a custom post type called Member. Each custom post will be assigned to different users where they can add and edit their ...
1
vote
0answers
18 views

Add css class to dropdown

This is a dropdown with two items. I want to visually give these two items a css style. Is this possible? This is the code I used: (function($) { "use strict"; tinymce....
0
votes
0answers
11 views

Expand mobile menu on button/link click

How can I expand the WordPress mobile menu on Button/link click? I tried searching online and I can't figure it out. I also tried using CSS classes to see if I can expand the menu on button click. but ...
0
votes
1answer
21 views

Why nav_menu_css_class doesn't work with apply_filters?

I was trying to add css class to nav items. The documented function call in WordPress docs was apply_filters( 'nav_menu_css_class', string[] $classes, WP_Post $item, stdClass $args, int $depth ) But ...
0
votes
0answers
9 views

Customize Menu Structure Creating a Section Where you can add icons/imgs

Basically i would like to add a section in "menu structure". So, when i access to any page/post i can create (for example) a select with some font-awesome icons class to every single <li&...
0
votes
0answers
13 views

Header dropdown not working on my custom built page

Hello my header drop down is working perfectly fine if i use it on the pages that i built with wordpress but the ones that i built from root in html php and css and imported the header dropdown is not ...
0
votes
0answers
20 views

A WordPress Navigation Dropdown Menu using Bootstrap 4.5.3 moves out of the browser from right side

I am using Bootstrap 4.5.3 and WordPress version 5.6.2 I have this code in my header for the navigation. <div class="container-fluid"> <nav class="navbar navbar-expand-...
0
votes
0answers
22 views

Bizarre Child Menu Issue on WP Site

I have a bizarre problem that I just can't figure out. I have been fixing this site for almost 3 days with so many customizations that the previous developer did. The structure of this site was ...
0
votes
1answer
19 views

WP Forms not displaying,becomming an fatal error

This is what i become after insterting a WPForm in Wordpress Fatal error: Uncaught exception 'Exception' with message 'There is no suitable CSPRNG installed on your system' in /var/customers/webs/...
0
votes
1answer
13 views

Add div content to my already existing menu

For the past days i've been trying to add my created code to my menu... without success This is my code : https://www.w3schools.com/code/tryit.asp?filename=GO9AAZCNLK4E To my website : https://www.dm-...
0
votes
0answers
9 views

Alter the page title with a hook, without altering navigation links

I've written a basic function with the goal of altering the page title. It works. However, the new string also replaces every single navigation menu item on the page. At first I thought that might ...
0
votes
2answers
76 views

Menu Items disappearing/being empty on save or post edit

I've been having this weird issue on a site for a few weeks now, tried everything I found by searching but still not being able to find a clue of the issue. Whenever I add some items to the Menu (...
1
vote
0answers
15 views

Automatically adding new post categories to menu

Disclaimer: I am not 100% fluent in php. If I am doing something wrong in asking this here, please let me know. Many thanks! A site that I am working on is set up with several custom post types: City, ...
0
votes
1answer
18 views

Why is my array of nav menus returning empty?

I am trying to retrieve of list of available menus but the array is returning empty. function get_menus() { $menu_list = []; $wcs_menus = wp_get_nav_menus(); foreach($wcs_menus as $m) { ...
2
votes
1answer
22 views

Second nav is merged with the first in mobile

When I load the website (https://notes.goncaloperes.com) on mobile one can see the two menus/navigations that exist However, when it loads, the two navs are merged and the second menu buttons can ...
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 ...

1
2 3 4 5
62