Skip to main content

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
1 answer
702 views

How to hide an item from nav menu on desktop view?(without plugin)

so I am using elementor for developing the website and in my primary header I have the logo, Nav- menu and button. Now what I want is I want to hide a specific item of Nav-menu on desktop but make it ...
Pratigya Rana's user avatar
0 votes
1 answer
109 views

Main Menu Hover is Always White

My Main Menu Hover color is always white. I used to be able to just change it in the customizer but that stopped working so I've tried every kind of CSS I can find, gone through inspecting it, tried ...
Cabin Puppets's user avatar
0 votes
1 answer
12 views

Tried to hide navigation menu on one page ended up SCRAMBLING the navigation menu on another

I am trying to remove the header and footer menus from this page (https://revrex.com/revrex-banking-onboarding) so that it is just blank with the embedded demo. I got the Conditional Menus plugin to ...
Nickie's user avatar
  • 1
0 votes
1 answer
64 views

register_nav_menus() not registering

I'm following an udemy tutorial and can't see where I'm going wrong. The menu is not showing up in WP admin's Menus. In the tutorial, they add this code, then click customize>menus and it's listed ...
Fio's user avatar
  • 1
0 votes
1 answer
27 views

I need to change the hyperlink attached to the logo on the mobile menu

I am struggling with this thing for 2 days. I have a hamburger menu and I want to edit the logo which is displaying in there. I could access the content in Appearance > Menus such as custom links ...
Abdelhalim Aljaml's user avatar
0 votes
1 answer
623 views

Give custom class names to WP nav sub-menu

I'm creating a menu that will have sub-menu > sub-menu > sub-menu. The styling is really involved so ideally I could rename the class name "sub-menu" based off what level of sub-menu ...
Kyle Klaiber's user avatar
1 vote
1 answer
255 views

Can't add custom post type archive page to menu

I cannot add this custom post type archive page to any menu from the admin. Adding via the front end customizer works fine. Viewing the archive page on the front end also works fine. My custom post ...
Tommizzy's user avatar
0 votes
0 answers
32 views

Is there a way to make it so that I don’t get a hamburger menu, but rather a desktop style nav, when resizing to a mobile size

I only have a few menus in my nav, and I don’t think a hamburger menu has the appropriate look for my mobile site. Anyway to force it to look like it does on the desktop?
Ethan Allen's user avatar
0 votes
0 answers
35 views

Nav menù doesn't display selected pages

I've included Elementor inside my custom plugin and now I'm creating my wp site layout. I've noticed that my nav menu will show all the pages I have created for my website, but from the settings I've ...
ICTDEV's user avatar
  • 133
1 vote
1 answer
1k views

WordPress nav Walker - Bootstrap 5.2.3 - submenu not opening

I'm trying to integrate WordPress Nav Walker with a two level dropdown, so: URL -URL2 --URL2 --URL23 I am using this code: wp_nav_menu(array( 'theme_location' => 'main-menu', ...
Pbalazs89's user avatar
  • 115
0 votes
1 answer
77 views

How to add more than one menu for logged in members?

I have the following code to show different menus to logged in members. I would like to add a second menu to be displayed when logged in, for a total of 3 menus, as there are two different menu areas ...
kerfuffleslop's user avatar
0 votes
1 answer
476 views

Critical Error when editing menu

I am having an issue debugging what appears to be a WP core issue. I am observing the following behavior when attempting to edit menus, see below for context I checked the error logs and the ...
grzybowski1911's user avatar
0 votes
1 answer
90 views

Footer navigation menu

Our website is https://de.ferberg.com and we are a manufacturer of warehouse equipment and mobile loading ramps. On our site the navigation menu is added to the footer via code and theme editor, it is ...
AUSBAU's user avatar
  • 1
0 votes
1 answer
24 views

Icon not shown in Dropdown menus in Twenty Seventeen Theme

I guess I removed the image used for the dropdown menu while cleaning up my site that uses the Twenty Seventeen theme.Now it shows nothing (or a box) next to a dropdown menu which is not ...
Tutul Ahmed's user avatar
0 votes
0 answers
61 views

Control page access based on User Meta data?

I want to control access to pages (and menus) based on whether the viewer has a value in a user meta data field. I've made a plugin that securely receives viewers from another private system where ...
Glen Little's user avatar
0 votes
1 answer
97 views

How does one add numbers to an admin menu?

I am trying to make a plugin and want to surface concerns in the admin panel menu row for my plugin, similar to the below screenshot from Wordfence. I have searched around Google, but all point me to ...
Me Myself's user avatar
0 votes
0 answers
25 views

How to change WP menu item type?

There seems to be no way to change menu item type from page to custom in wp admin. How can I do this? If I have big menu it’s very cumbersome to build these always by hand… Type change should be in ...
coder's user avatar
  • 1
1 vote
1 answer
46 views

Submenu items not working anymore

Not sure where I am going wrong here... Submenu items in my website have stopped working across entire site with custom links/anchor tags. Examples: https://bell.works/new-jersey/on-the-block/ (Sub ...
JadaLeigh's user avatar
0 votes
1 answer
58 views

How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?

When creating a menu, and after selecting a page as front page and another page as posts page..it appears next to the page in menu screen. For example, "Front Page" appears next to home page,...
Hatem Frere's user avatar
0 votes
0 answers
22 views

Profile Image displaying on Wrong side of Wordpress Navigation Menu

Am creating a WordPress site whereby am enabling users to upload their own custom profile images from a custom form. Once they upload am storing the image URL in a database table and the image is then ...
Pweb's user avatar
  • 1
0 votes
0 answers
56 views

Displaying a Custom Avatar in WP Bootstrap Navwalker Menus in Wordpress

Am creating a WordPress site whereby am enabling users to upload their own custom profile images from a custom form. Once they upload am storing the image URL in a custom database table and the image ...
Pweb's user avatar
  • 1
0 votes
2 answers
426 views

Displaying an Uploaded Image as a Custom Avatar in Wordpress

Am creating a WordPress site whereby am enabling users to upload their own custom profile images from a custom form. Once they upload am storing the image URL in a database table and the image is then ...
Pweb's user avatar
  • 1
0 votes
1 answer
112 views

Add CSS class to posts with certain meta key

I am working on my header navigation and I want to underline the menu item for certain conditions. I would like to add a CSS class if the post has the ID 21638, or the post has the meta value 'bloom' ...
Charalambos's user avatar
2 votes
1 answer
408 views

Twenty-Twenty-Two Child Theme Mega Menu

I’ve got a limited knowledge of CSS. What I know I've learned while programming. That said, I’m working with the Twenty-Twenty-Two theme. I’m trying to add a mega-menu to my child theme. The ...
Phil Huhn's user avatar
0 votes
0 answers
125 views

Call wordpress function through functions.php when pressing menu

I have created a menu through wordpress admin menu creation but I'd like to call wp_cache_flush() when I press every menu item... is there any hook I can call through functions.php so I can execute ...
Luigino's user avatar
  • 103
1 vote
0 answers
91 views

How do I get the menu items based on name or ID?

I have this code that gets menu items, currently it works using slug-id (main-menu) $menu_name = 'main-menu'; if (($locations = get_nav_menu_locations()) && isset($locations[$menu_name])) { ...
jimi-del's user avatar
1 vote
1 answer
26 views

Custom e-commerce display for specific users [closed]

I am starting to build a WordPress website, with one specific functionality I’m struggling with. The business sells custom, recurring products to industrial customers. So, the desire is each customer ...
Steve's user avatar
  • 13
-1 votes
1 answer
40 views

How to add different menu items on different menus?

This may sound weird, but I need to add different menu items to two specific menu types. When I mean different menu items, I mean, the items I set to main (header) menu are only for that menu and the ...
AtomX's user avatar
  • 109
0 votes
1 answer
312 views

How to set menu Display location

I have created a menu and I have the ID. $menu_id = wp_create_nav_menu( 'Main Menu' ); And I have registered a navigation menu location: register_nav_menus( array( 'menu-header' => '...
djanym's user avatar
  • 125
1 vote
1 answer
754 views

How to add custom menu to block theme?

I'm creating a theme based on the 2023 block theme from WordPress 6.1. I need to create a custom menu as the built-in one is too limited for me. I initially thought I can just enter the menu under &...
Dannyboy's user avatar
  • 171
2 votes
0 answers
745 views

Add acf custom fields so sub item in menus

Please, can anybody help me, I've been struggling so long with this Basically, I want to add custom fields to sub menu items, I want to add an image and a link. I can see fields showing up in sub ...
studentM's user avatar
0 votes
0 answers
20 views

get menu name for the current displayed page

I need to get the current menu name/id for the current displayed page so that a different logo can be displayed based on the pages current menu. I have one site that shows two different clubs, each ...
centrespot's user avatar
1 vote
1 answer
98 views

My wp_update_nav_menu action is firing twice

i am trying to setup a wp_update_nav_menu action in a Plugin. Now I wonder why this is firing twice. I want to update all my pages with this hook in a headless wp implementation. And this double ...
Friedrich Siever's user avatar
0 votes
0 answers
104 views

Dynamic Menu Item

I'm a complete WordPress n00b, so your guidance is very much appreciated. Long story short I am running a theme with a child theme attached. I need a function that will retrieve my site's latest post ...
Christopher's user avatar
0 votes
1 answer
1k views

Get Menu Items from REST API (React)

I'm a bit rusty on the WordPress since version 5.9 but I can see that they've added Menus to the REST API and we can use new get methods in: wp.data.select("core"). I'm trying to get the ...
Sean Varnham's user avatar
0 votes
0 answers
83 views

Wordpress removes URL parameters from menu elements when saving the menu

I'm trying to add some submenu elements to interact with a shortcode in my page. The shortcode is a tabbed group and the following URL opens a specific tab: https://wp1.samuelezappala.it/?tab=prestito-...
SamuXzX's user avatar
3 votes
1 answer
1k views

Any way to use classic Menus in Full Site Editing?

I use an FSE theme and as you might know the Navigation block is pretty limited. I want to implement a custom mega-menu-ish navigation for a big website. Is there any way to enable the Appearance->...
Akshay K Nair's user avatar
0 votes
0 answers
51 views

What is the best way to incorporate responsive dropdown navigation menu into custom theme?

I am very new to developing and just started with building a custom theme. I already registered a menu using the wp functions (register_nav_menus etc.) and am now trying to get my sub-menu to work. ...
georg1402's user avatar
1 vote
1 answer
285 views

Problems with draft website pages

I set up all the pages for my website (set as public & DRAFT) (https://9v7.961.myftpupload.com/?page_id=50) - BUT - lots of stuff not working (menu shows no pages, cannot link to Posts, custom ...
Leslie's user avatar
  • 11
0 votes
0 answers
26 views

Sub menu for a (single) page

I am looking for a way that let's me subdivide a page with a pagination-like menu. However, I want to name the menu-items (no numbers...) and don't want the entire page to refresh when clicking on a ...
Simon Fromme's user avatar
0 votes
0 answers
83 views

Database structure Menu Item

I want to write the menu items into the database using a program. I also saw the structure of the database here, but I don't understand the dependency of the menu items. I also created a test menu ...
trix0's user avatar
  • 1
0 votes
2 answers
337 views

Declaration of mandoe_menu_walker::start_el(&$output, $item, $depth, $args) must be compatible with Walker::start_el(...)

I've originally hard-coded menu links into the mega menu of mandoemedia.com in order to achieve the icon and description of each link. I'm wondering if it is possible to convert these submenus into ...
Steve's user avatar
  • 1,707
0 votes
2 answers
173 views

Remove Unused Menu Locations

I added two menus register_nav_menus ( array( 'primary_menu' => esc_html__('Primary Menu', 'sre'), 'footer_menu' => esc_html__('Footer Menu', 'sre'), ) ); But I'm unable ...
Junky's user avatar
  • 103
1 vote
1 answer
58 views

Displaying list of random links using wp_nav_menu

Is it possible to modify wp_nav_menu to display a list of random links? I tried adding 'orderby' => 'rand', but that didn't do anything. I'm afraid my PHP skills are rudimentary, at best. The rest ...
kissmykitty's user avatar
0 votes
1 answer
201 views

Adding conditional classes to wp_get_nav_menu_items

I am using wp_get_nav_menu_items to display my header menu with the code below <?php $menu_name = 'main-menu'; $menuitems = wp_get_nav_menu_items($menu_name); ...
Saaif Al-Asad's user avatar
3 votes
1 answer
126 views

Is it possible to know which menus are owned by a plugin?

I'm building a plugin that needs to generate a list of active plugins along with the menus that were created by each plugin. After browsing core I couldn't find anything that would associate the ...
Jay Mandell's user avatar
2 votes
2 answers
2k views

Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function

I am working on a website with 700+ pages. Most of the pages have similar keywords/slugs. Using the traditional Appearance > Menus editor is nearly impossible because I can't find the pages I am ...
RCNeil's user avatar
  • 548
0 votes
1 answer
71 views

How are methods of class Walker_Nav_Menu invoked?

The class has a method called start_el which runs displaying the menu items without invoking it. Don't you have to invoke it like so: $example = new Walker_nav_menu(); $example -> start_el(args...);...
brittle_spirit's user avatar
0 votes
1 answer
265 views

wp_nav_menu removing containing UL with 'items_wrap' => '%3$s' not working

I am attempting to combine two menus into one so I would like to use wp_nav_menu without the uls wrapping the list items. I have found several questions that say this can be done by setting '...
user19103974's user avatar
0 votes
1 answer
165 views

Echo Menu located in primary navigation

I have googled a lot looking for echoing main menu of primary navigation in wordpress but I did not found anything. DO anyone has an idea how to do that? Thanks in advance
Ahmed C's user avatar

1
2
3 4 5
65