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

Mobile mode Hamburger menu is not working properly [closed]

Below is my desktop mode menu: here menu is coming properly but same menu is not working properly in mobile mode. In mobile mode, when I click on hamburger menu, it is displaying something else(...
user avatar
0 votes
0 answers
11 views

Customize Widget Navigation

How is it possible to customize the footer menu that has been added via widget and not defined in the functions file? I'm looking for a way to remove the container and add a predefined icon for the ...
user avatar
0 votes
1 answer
17 views

How can we change the url of menu item? [closed]

I have a default menu of my theme. It has 4-5 homepages and we have selected homepage2 for display on hover of home , on click of home menu, on click of logo. What I am not able to change is the url ...
user avatar
0 votes
1 answer
20 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...);...
user avatar
0 votes
1 answer
20 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 '...
user avatar
0 votes
0 answers
17 views

Efficient wp mobile menu

I have started developing my very own theme, im kinda new to wordpress development so i would like some help/advice. I started with the menu by using bootstrap which works fine with wordpress, now ...
user avatar
  • 1
0 votes
0 answers
19 views

Add class to ul and li in wp_na

I want to add class to ul and li using wp_nav_menu , I have checked documentation and I found this : wp_nav_menu(array('theme_location'=>'primary','menu_class'=>'navbar-nav')); but the class is ...
user avatar
0 votes
1 answer
21 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
user avatar
0 votes
0 answers
16 views

WP-CLI Add category as menu item main-menu

I've found this documentation about adding terms using WP CLI: https://developer.wordpress.org/cli/commands/menu/item/add-term/ and tried to find out how I can add an existing category to the main-...
user avatar
0 votes
0 answers
13 views

How to show only current item children using wp_nav_menu?

I have a 3-level WooCommerce category structure like this: Main Category 1 Child Category 1 Child Category 2 Third-level Category 1 Third-level Category 2 Main Category 2 Child Category 3 Child ...
user avatar
1 vote
2 answers
118 views

$pages = get_pages('child_of='.$post->ID); Why arguments are concatenated?

I am reading a book called "Learn to Create WordPress Themes by Building 5 Projects" . In that to retrieve the parent for pages, they have a function to get the parent of the pages. The ...
user avatar
0 votes
0 answers
30 views

pre_get_posts fix to show menu on CPT Archives broken WP 6.0

Before WP 6.0 we have had to add this pre_get_posts fix to show the wp_nav_menu on custom post type archive and taxonomy pages: wp_nav_menu not appearing for a couple pages Here is an example of the ...
user avatar
0 votes
0 answers
9 views

Duplicate menu items when auto generating menu from product categories

I have been searching for solutions for a problem that many have in Wordpress. I wanted to create a menu that automatically adds children and grand children of product categories that are already in ...
user avatar
0 votes
0 answers
13 views

How to display conditional menus with Twenty-twenty two theme (and other new block themes)?

With earlier versions of default Wordpress themes I was able to display an alternative main menu depending on the category of the given page or post, using this filter in my functions.php: ( In this ...
user avatar
  • 217
0 votes
1 answer
31 views

WordPress Nav Walker - Top menu link with dropdown link not clickable (dropdown opens)

I'm trying to setup a WP NAV WALKER with dropdowns. The links work fine, the dropdowns work fine, however the parents of dropdowns should also have links, but they don't trigger, instead, they just ...
user avatar
0 votes
1 answer
11 views

Using menus to link to sections on the home page

I have many menu items linking to sections (anchors) on pages. They are working fine on every page except the home page. ON the home page, the first time you click on a menu item it works, but the 2nd ...
user avatar
0 votes
0 answers
9 views

Button and Countdown overlapping mobile menu

Trying to get around an issue for some time now but can't figure out why the youtube play button and countdown are above my mobile navigation. Tried z-index but can't find anything else that might ...
user avatar
0 votes
0 answers
35 views

Theme Menu vs Native Menu

I installed the Blocksy Theme a Starter Site from Blocksy Now, that starter site already comes with a Menu, like this: But when I navigate to the native Customizer and go to Menus, it says there ...
user avatar
0 votes
1 answer
17 views

Menu for taxonomies and posts belongs to taxonomy

I am currently looking for a solution to the following problem: I have a Custom Post Type named "docs" and for it a taxonomy "docs_category". Note: The taxonomy is hierarchical. I ...
user avatar
0 votes
2 answers
24 views

Filter nav menu items HTML tags and wrap inner text with span

I am using the following filter to select <a> tags from a specific menu that have no attributes (href, class, etc.) and replace them with <button> tags. add_filter( 'wp_nav_menu_items', '...
user avatar
0 votes
0 answers
10 views

Keep source page URL parameters on custom link menu item

I am using the WPML language plugin with the current language setting attached as a URL parameter. I have some menu items that point to specific sections on a page using a custom link with an anchor. ...
user avatar
0 votes
0 answers
48 views

wp_nav_menu displaying all pages

As the title says, I'm using wp_nav_menu in header.php to load in the audience, secondary, and main menus and when I do, every menu contains every page - or at least many more pages than I selected ...
user avatar
  • 1
0 votes
2 answers
23 views

Is there a way to add the list of recent posts into the admin sub menu on hover?

If I need to edit a specific post then I need to click the "All Posts" link and then find it. It would be nice to click directly on a link from within the popup hover sub menu. Something ...
user avatar
0 votes
0 answers
38 views

WordPress custom menu can't show 3. level submenu

I Use a custom walker from my menu in WordPress and my menu doesn't show all levels. https://soulofcroatia.com/ ->One Day menu item. This is my code in header.php <?php ...
user avatar
0 votes
0 answers
39 views

How do I convert a custom menu wp_get_nav_menu_items into Fourth level?

how can I turn this function from Two-level into the Fourth level in WordPress? This function can only echo the parent and its child, but I'm trying to make it unlimited or at least 4 levels if it is ...
user avatar
0 votes
0 answers
26 views

Wordpress Menu Problem

<!-- Mobile Menu Desktop --> <div class="show-mobile"> <div class="site-menu"> <ul class="menu"> <li><a href="#&...
user avatar
  • 1
0 votes
0 answers
8 views

Additional navigation bar in header

Recently, my site started showing two navigation bars at the top of my page. They are also the wrong layout. I am fairly new to WordPress. I have only designed five websites so far. This is the ...
user avatar
  • 1
0 votes
0 answers
26 views

Nav Walker that shows only children and siblings of top level parent menu item

I have a nav menu that is structured like this.. Main Section 1 – Child Link 1 -- Grandchild Link 1 – Child Link 2 – Child Link 3 Main Section 2 – Child Link 1 – Child Link 2 – Child Link 3 Lets say ...
user avatar
  • 101
0 votes
0 answers
21 views

Hook or callback when wp_nav_menu() has completed

I am modifying the $output of wp_nav_menu() using a custom walker, and I need to run a function after the final closing </ul> of the entire menu. I can only see the following methods available: ...
user avatar
0 votes
1 answer
40 views

Automatically add images to a menu

I am calling a menu into a page, but I want to add images next to the title of the menu items. I have this code: <ol> <?php $navMenu = wp_get_nav_menu_items(2096); /*/Pass Nav Menu_id or ...
user avatar
  • 167
0 votes
0 answers
71 views

how to changes mobile menu toggle breakpoint in Wordpress

I want to change the mobile menu toggle breakpoint in twenty-twenty one theme, want to show on 767px but it shows on 481px by default.
user avatar
1 vote
1 answer
42 views

if role is logged in then do something

I need some pro eyes please. Over all, I'm adding one button/link to the MAIN NAV depending on the logged in role. I have this “working” code: if ( ! function_exists( 'add_extra_item_to_nav_menu' ) ){ ...
user avatar
0 votes
1 answer
19 views

How to display already created menus via php?

So I have a couple of already created menus on my wordpress installation. What I am planning to do is display navigation menus in a sliding popup. I have tried using wp_nav_menu() but it always shows ...
user avatar
0 votes
1 answer
44 views

Warning at top of website & top menu gone

This warning has appeared at the top of our website, and our top menu bar has disappeared: Warning: call_user_func_array) expects parameter! +~ be a valid callback, function '...
user avatar
0 votes
1 answer
22 views

Wordpress website - Mobile menu behavior help

hoping you could help. So, Im using xtheme, and wordpress. And I have code to make my mobile menu a fixed top menu, so its always visible. I also have JavaScript to make it retract upon clicking a ...
user avatar
0 votes
0 answers
12 views

(Mobile) Hamburger menu disappeared from a page (only one)

the hamburger menu is working correctly except for this page, where it's not present. It worked before, now it has disappeared. What can I do?
user avatar
0 votes
0 answers
21 views

How to create archive page to add in menu

I have a menu like this below But I can't find the page. Is this a wordpress page or template located somewhere? And how can I create archive page?
user avatar
-1 votes
1 answer
26 views

How was this menu system created?

Can anyone give me a clue how this menu system was created? https://40thdems.org/ This is a WordPress site using the Divi theme. Thanks in advance for any pointers!
user avatar
0 votes
0 answers
11 views

My menu doesn't fit in the default screen in the mobile version

I've build this website: https://study-help.lu/wp/fr/page-dacceuil/ When I load it on my phone the menu just appears on the outside of the screen on the right. I know a bit of CSS but I don't know the ...
user avatar
0 votes
0 answers
20 views

Wordpress - When visiting a `single post/ single.php` my category menu item link becomes active

I'm new to WordPress. So, I'm not really sure if it's normal behavior or not but this is bothering me. So, I've my main navigation menu consists of Home | category_1 | Category_2 | Category_3 ... The ...
user avatar
  • 101
1 vote
0 answers
192 views

You do not have permission to create Navigation Menus - Twenty Twenty-Two theme

I have a WP Multisite, where I am the super-admin of the Network and the only admin (also super-admin) of this particular site. Everything is working fine, but whenever I try to edit/add Navigation ...
user avatar
1 vote
1 answer
22 views

Class active for Archive link - looped out

I want to have the current Archive page link to have the class "selected". So if I'm in /category/featured/ that button on the menu should have the class selected. After trying several ...
user avatar
  • 13
0 votes
0 answers
10 views

How do I make it so a post only shows in its category archive but not the home page?

As of right now if I make a post and attach a menu to it, it shows in the main page too. Like I am making a hamburger recipe and I only want it to show under 'fast-food' but it also shows on the home ...
user avatar
0 votes
0 answers
7 views

Secondary Menu Not Functioning as a Sticky Menu

here is my css code for attempting to get my 2nd menu sticky. Why won't it stay sticky? My site: computerservicestech.com .site-content, .entry-content, .entry-content p:first-of-type { margin-...
user avatar
0 votes
0 answers
18 views

Auto delete menu items with zero products (woocommerce)

I want to run an automatic deletion of empty menu items. I have a Woocommerce store which has product categories in the menu. If all products of a brand get sold out, the menu item will open an empty ...
user avatar
0 votes
0 answers
19 views

Slideout submenu in mobile

How do I achieve this in the mobile menu? I have tried wp mega menu or max mega menu plugin. They all provide a dropdown submenu. How do I have this slideout submenu? https://www.asos.com/women/ I ...
user avatar
0 votes
1 answer
15 views

Custom menu not showing even though it shows as being registered?

I'm running into a really weird problem. Some quick background: I cloned this workflow from one I've been using before but just updated everything including node packages and the gulp functions and ...
user avatar
  • 3
0 votes
0 answers
95 views

How to change how WordPress renders navigation menu on Block Themes

With classic templates it was easy to understand how to overwrite how Wordpress navigation menu was rendered, but I'm struggling with the new Theme blocks approach. I know it uses the navigation block ...
user avatar
  • 111
0 votes
0 answers
7 views

Featured Images most often doesnt appear

I recently facing a problem that never occure before. When i open "add new post" page most of the time "Featured Image" option doesnt appear.However if i keep refreshing the ...
user avatar
1 vote
0 answers
85 views

burger on mobile

it's a week that I'm stucked with the burger menu on mobile/small screen. When I click on the burger nothing happens even if everything seems good with the code. Where am I wrong? Here the HTML / PHP ...
user avatar
  • 11

1
2 3 4 5
64