Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
2 answers
16 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
19 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
21 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
10 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
18 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
24 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
  • 165
0 votes
0 answers
20 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
38 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
17 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
27 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
19 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
10 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
19 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
10 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
18 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
0 votes
0 answers
47 views

How to display conditional menus with Twenty-twenty two theme?

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
1 vote
0 answers
103 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
14 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
15 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
14 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
52 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
  • 101
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
45 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 vote
0 answers
10 views

Walker class conditional based on parent menu item label or custom css class

I'm out of my shallow depth here. I'm trying to add html to the end of drop down menus whose parent item is either a specific item label or custom css class that's been added via the WP menu admin. ...
user avatar
  • 11
0 votes
0 answers
24 views

Option to create menu is missing

I installed WordPress locally on WAMP server. I did also install Elementor plug-in. I don't find an option to create menu bar and add pages to the menu, anywhere. Do I need to create more pages for ...
user avatar
  • 101
0 votes
1 answer
33 views

Is there a hook for nav menu item links to add custom css programatically?

I know there is this nav_menu_css_class hook to add a custom class to the list items in the nav, but is there a similar hook to add a custom class to all link items in the nav? I want all my links in ...
user avatar
  • 119
0 votes
0 answers
20 views

Link after <? wp_nav_menu() ?> Wordpress

Currently I am using: <?php wp_nav_menu( array('menu' => 'Second navigation', 'menu_id' => 'second_navigation', 'container' => false, 'menu_class' => 'nav', 'link_after' => '<span ...
user avatar
0 votes
0 answers
39 views

New menu is not showing in api response

I just make a custom Menu because I wanted to add a link in my menu but for some reason the new menus are not showing in the API response. any idea why and how should I fix this? I add a new menu ...
user avatar
  • 121
0 votes
0 answers
18 views

How can I put content before my custom post type default pages?

I created a plugin with a Custom Post Type, and I want to add a menu before all of my plugin pages. The pages are mixed, there are custom pages (where I can add the menu easily), and there are a few ...
user avatar
  • 1
0 votes
1 answer
15 views

Can I have custom post types in "Add menu items" on in the Admin > Appearance > Menu

I want to easily add custom post types to my menus. I know that I can do it with a custom link but I want to make it as easy as possible for a client. How do have a custom post type selectable under '...
user avatar
  • 153
0 votes
0 answers
9 views

Newly created header is not visible on website

I have created a new menu on my WordPress website (using salient theme) and set it as a Top Navigation Menu (primary one ) but when I update it menu is not visible on website it is still showing old ...
user avatar
0 votes
0 answers
12 views

Categories are not available AT ALL under Menus

I installed and activated Envo Shop for my new WordPress website which is hosted on Hostinger. Everything almost is going good except, Categories which are not showing up under Appearance, Menus. ...
user avatar
  • 1
0 votes
1 answer
31 views

Problem with links once in portfolio item

Hope someone could help me. Link problem: This is my Homepage URL: https://epix.com.mx Portfolio onepage link: https://epix.com.mx/#Projects Portfolio item link: https://epix.com.mx/?portfolio=...
user avatar
0 votes
1 answer
48 views

How to link current logged-in user to their author page via URL (Beginner)

I require a URL that links the current logged-in user to their author archive page. I came across some code from a similar question here (see below). It works for me but unfortunately, it links to the ...
user avatar
0 votes
0 answers
43 views

Top bar menus not showing on mobile

I am using the Bam theme in wordpress. There is a Top Bar where I have added some menus. It's showing on desktop but not on mobile or tablet. How can I resolve this issue? Any help would be ...
user avatar
0 votes
0 answers
34 views

How do I add 3rd level of dropdowns to wp_nav_menu array?

How do I get 3rd level to show? <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'collapse navbar-collapse', '...
user avatar
  • 247
0 votes
0 answers
17 views

How to show only the last two categories in a menu?

I am working with many categories and their sub-categories (sub items). I felt the need for a customization, but I could not achieve exactly what I wanted. Normally, categories and sub-categories are ...
user avatar
0 votes
0 answers
22 views

I'm trying to remove a duplicate menu, which only appears on the homepage?

I've used Elementor and Elements Kit to create this website. It's accidentally generated a duplicate menu which only appears on the homepage and i'm desperate to remove it. I've tried to use ...
user avatar
0 votes
0 answers
14 views

Embedding an external webpage within a page? Is it possible, is it a good idea?

I manage www.CLCCedarRapids.com and have given it an overhaul. There is one thing that still bugs me though... if you click on giving or events it takes you to an external webpage (through Planning ...
user avatar
0 votes
1 answer
110 views

Adding a unique ID to each sub-menu

I have the following menu via header.php: <?php wp_nav_menu( array( 'container' => false, 'theme_location' => 'primary', 'items_wrap' => '<ul class="...
user avatar
  • 1,913
0 votes
1 answer
25 views

Dynamically populate the menu when a new category is created

I was asked to make a dynamic menu with sub-items. This is the idea: $categories = array{ ‘cars’, ‘boats’, ‘airplanes’ }; Home About us Categories Cars Boats Airplanes On the Categories session, ...
user avatar
  • 1
0 votes
1 answer
94 views

Replace menu <a> tag with <button> tag

I have the following menu setup via header.php: <?php wp_nav_menu( array( 'container' => false, 'theme_location' => 'primary', 'items_wrap' => '<ul class=&...
user avatar
  • 1,913
0 votes
0 answers
25 views

Possible to append class to nav menu added to widget area?

I'm wondering if it's possible to add a menu class to a navigation menu added to a widget area? I realize that when adding a menu to a template via wp_nav_menu one can use the menu_class option to ...
user avatar
  • 215
0 votes
1 answer
54 views

How to display an image before title text in menu items

I am using Advanced Custom Fields to add images to individual menu items. These images are being appended to the $item->title with the following code: function wp3456789_wp_nav_menu_objects( $items,...
user avatar

1
2 3 4 5
63