Skip to main content
Share Your Experience: Take the 2024 Developer 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
1 answer
12 views

How to build help pages similar to Wordpress Developer Resources

We need to build a help page similar to Wordpress Developer Resources (see the screenshot below). We're problably looking for a developer solution as we haven't found any plugin that would fit our ...
Łukasz Korona's user avatar
0 votes
0 answers
6 views

add_submenu_page add multilevel menu

Im using: // wp-admin hotels list in sidebar function add_custom_submenu_under_add_new() { $args=array( 'post_type' => 'hotel', 'posts_per_page' => -1, 'post_parent' =...
kroma's user avatar
  • 3
0 votes
1 answer
15 views

Show shortcode output in menu

I would like to show shortcode output in menu like below. How can I do that ?
Foysal's user avatar
  • 449
0 votes
1 answer
12 views

Show a text in menu

I am trying to show a custom text in menu. I am using below code on functions.php of current theme. add_filter( 'wp_nav_menu_items', 'add_search', 10, 2 ); function add_search( $items, $args ) { if ...
Foysal's user avatar
  • 449
0 votes
0 answers
5 views

How to organize the header elements, so that it doesn't come out differentin mobile view

Hi this is the website where its been stacking the columns in mobile view. https://ebenmission.org.au/ Because there are so many elements, I've been manually adjusting it rather than editing it in a ...
Rachel Kim's user avatar
0 votes
0 answers
20 views

Off-Canvas Menu Toggle Issue After WordPress Core Update

After a recent WordPress update, I've encountered an issue with the toggle functionality of my off-canvas navigation menu. I'm using my custom-built theme, built on Twenty Twenty Three theme. The ...
dreamer's user avatar
0 votes
1 answer
17 views

Redirect Issue on a link from the client side

I have implemented header menu using the WordPress menu tab and it is working correctly on my local pc but client from usa and other countries have frequently complaint that the sales button on the ...
Frank's user avatar
  • 1
0 votes
2 answers
48 views

Hide menu items from not logged in users

I have a theme which automatically adds all published pages to the menu. Is there a way to override this and add some of the pages only when the user is logged in? I thought maybe there is a filter ...
inf3rno's user avatar
  • 135
0 votes
0 answers
14 views

Menu drop down covers contents of page in Mobile view

Hi folks I want to try fix my menu. When on a mobile device I click the burger menu. Its expands but it partially coves up the contents of my pages or posts. Is there a workaround for this ? The ...
user3259342's user avatar
1 vote
0 answers
18 views

Is there a way to eliminate flyout menus when adding a post?

It seems like each new version of wordpress adds more intermediate menus and menu options than the previous. Particularly heinous examples include the Preview button with its form-factor checkboxes, ...
nich's user avatar
  • 13
0 votes
0 answers
28 views

How to replace hamburger icon with "Menu" text?

My client has asked me to replace the hamburger icon in the mobile menu with the text "Menu", because he finds it more intuitive. I'm using the WordPress theme Kumle. In the file "...
Giovanna Coppola's user avatar
1 vote
0 answers
18 views

Custom loop menu is not working

I am using the below code to create a custom WordPress menu for mobile. With this code, nothing is return. Even the menu is not retrieving. Can anyone assist me with this? This is a multilingual ...
user2584538's user avatar
1 vote
0 answers
9 views

Wordpress menu disappears in category pages

I have a custom query to order and display posts in my functions.php, and I noticed that the navigation menu disappear in those categories! function my_filtro_ed_ordine( $query ) { if ( ...
Arianna's user avatar
  • 11
0 votes
0 answers
20 views

How to Remove Parent Page menu slug from WordPress Submenus?

By default, WordPress adds a parent menu slug to submenu items if there are three or more nested submenus. I want to remove that. For example, in the above case, the "service" menu has ...
Ashish's user avatar
  • 1
3 votes
2 answers
125 views

How to get and set post meta for core/navigation-link?

I'm extending a plugin that updated nav menu items with post meta data. This was previously done via Appearance>Menus and Appearance>Customize using wp_nav_menu_item_custom_fields and ...
Diana's user avatar
  • 103
0 votes
1 answer
45 views

How To Create Footer Menu Location For The Latest 2024 Cirkle Theme

The theme that I am working with is Cirkle Theme. I am not a coder and with very limited tech experience with wordpress site building. I created footer 1 and footer 2 Menus but there is no footer ...
Phineas's user avatar
1 vote
0 answers
48 views

Is there any documentation on JS trigger for the Gutenberg "Navigation" block?

I'm trying to programmatically trigger the close function on the Navigation block (I'm using swup and want to have the nav close when a new page dynamically loads). I see that it's using the ...
Dexter Adams's user avatar
0 votes
0 answers
39 views

make my custom theme support polylang plugin

I created my own custom theme with wordpress and now I want to add english language to my site (defualt is persian rtl). for this I installed polylang. I create menu in wordpress like this: functuions....
Alipvd's user avatar
  • 3
0 votes
0 answers
21 views

Why is wp_nav_menu() not removing the container around the nav <ul>?

I am trying to remove the <div> that wraps the <ul>, but when I set 'container' to false or '' the <div> still shows up. Why is it not being removed? Example with false: <nav id=&...
JayDev95's user avatar
  • 179
0 votes
2 answers
19 views

Trying to add CPT to menu automatically

Ok found this code here by PRESSWORD add_filter( 'wp_get_nav_menu_items', 'cpt_locations_filter', 10, 3 ); function cpt_locations_filter( $items, $menu, $args ) { $child_items = array(); $...
Bellwether Marketing's user avatar
0 votes
0 answers
45 views

How can I display different menu for logged in users using a block theme

I am trying to display a different menu for the logged in users. The problem is that the classic wp_nav_menu_args filter does not work for block themes. Or I can't make it work. Does anybody know how ...
GKaplan's user avatar
0 votes
1 answer
178 views

Adding 400 product categories with their hierarchy to a navigation menu

I've been trying to figure out a way to bulk add all the product categories from WooCommerce without having to add them manually through Appearance -> Menu. I need their hierarchy to follow but I ...
commparlimage1's user avatar
0 votes
1 answer
18 views

Top Level Menu Item points to first item on submenu

Maybe this is simple, but I can't work it out ... is it possible to have a top-level menu item point to the first submenu item? For example, if I have a menu structure for a tourist website that goes ...
rdatlanta's user avatar
0 votes
0 answers
17 views

wp_nav_menu parent in submenu

I'm using wp_nav_menu() to display a multilevel menu. How can I add a parent link as a first item to the submenu? - Item 1 -- Item 1 (parent) -- Item 1.1 -- Item 1.2 -- Item 1.3 - Item 2 - Item 3 ...
Matt's user avatar
  • 1
0 votes
0 answers
18 views

How to add a Year shortcode in wordpress Menu

function current_year() { $year = date('Y'); return $year; } add_shortcode('year', 'current_year');
Maroju Prashanth's user avatar
0 votes
0 answers
18 views

Add a new menu selector element into WordPress nav-menus.php

How to build a custom menu selection element in the Menu admin (nav-menus.php) section of WordPress similar to how custom Posttypes/Taxonomies are automatically added in when created and then users ...
samjco-com's user avatar
0 votes
1 answer
73 views

Override theme hamburger menu to work without javascript (noscript)

What wordpress hooks can be used to override how the primary menu is displayed in my wordpress header's navigation menu -- ideally in a way that will work cross-theme. I need to build a wordpress ...
Michael Altfield's user avatar
0 votes
0 answers
10 views

custom post type dynamically shows in menubar in wordpress

I am developing a hospital website in wordpress. For that I make a custom post type "Services". All the hospital services (ex:ICU, CCU, NICU, Emergency etc) are going under this "...
Raff's user avatar
  • 1
0 votes
2 answers
306 views

Add line break for menu items

I have some items in my menu that I would like to be set on two lines. For example I have these items : Home - Get in touch - Contact us For the item "Get in touch" i would like the "in ...
Peter's user avatar
  • 11
0 votes
1 answer
11 views

Customized Divi Theme Needs more Menus

I have a customized Divi theme built by a marketing agency that I no longer partner with. My theme only supports three menus (header, secondary, and footer), which are all used; however, now my not-...
Rissa Guffey's user avatar
0 votes
1 answer
64 views

Creating a dynamic bootstrap tab menu for WordPress

I'm trying to create a dynamic bootstrap tab menu for WordPress. I showed the categories as a menu on the front page. According to the menu title, the correct loop result does not appear and I click ...
wws34's user avatar
  • 1
0 votes
1 answer
84 views

Wordpress multisite sharing menu having working current_menu_item class

On wordpress multisite, I have added code as bellow to have shared menus for all sites. <?php $blogs = get_sites(); foreach( $blogs as $b ){ $b-&...
Swaranan Singha Barman's user avatar
0 votes
0 answers
61 views

Conditionally get ACF field in Wordpress nav walker based on parent menu item?

I am building out a mega menu for a site and I have some ACF fields set up that I want to display in each of the sub-menus in the navigation. I want to specify which field to used based on which ...
user13286's user avatar
  • 255
0 votes
1 answer
203 views

Render link description in navigation block

I use Navigation block (Navigation menu) for my header menu. The problem I faced is that I can't render on front link description for the menu items that has children. I tried walker_nav_menu_start_el ...
oshka's user avatar
  • 11
0 votes
0 answers
10 views

How to erase space above menu bar? Or just erase "first row" entirely

Summary: The space above the menu and at the end of the website cannot be erased. I use theme Blocksy. Now the menu is not attached to the top.enter image description here Question: Do you know how to ...
AyoBonaire's user avatar
0 votes
0 answers
38 views

Prev/Next links that follow a custom menu order?

Is there a way to include prev/next links that follow a custom menu order? For example, let's say I have a custom menu set up like this: Project 1 Project 2 Subproject 1 Subproject 2 Project 3 I ...
Desi's user avatar
  • 1,209
0 votes
1 answer
25 views

I only want to show links to categories that have posts in 'publish' state in my menu

I am working on a WordPress project where I want to dynamically filter menu items (and possibly their parent items) based on whether they are associated with any published posts. Specifically, I am ...
DiaJos's user avatar
  • 101
0 votes
0 answers
22 views

Delete Accordion

im new here. Im not even sure if this called accordion or not. Ive been wanting to delete it but dunno how. Its a section one of my menu.
Jay's user avatar
  • 1
0 votes
0 answers
26 views

WooCoomerce: cannot change menu color on the woocommerce pages only

I have a problem with the transparent header. While it looks good on the main pages, in the shop, cart, and checkout pages of WooCommerce, the transparent header doesn't work because the menu items ...
Mary's user avatar
  • 1
0 votes
0 answers
23 views

Can I create main menu without using built-in menu

Can I create the main menu in the header.php file without using - without Appearance--> Menus without register_nav_menu() without walker What are the disadvantages? My navigation markup: <nav ...
kmadhu's user avatar
  • 1
0 votes
0 answers
28 views

Moving active menu item onscreen for mobile

I've created custom CSS to change my wordpress menu into a horizontal scroll for everything under 1057px. I've researched for hours on how to scroll the menu item onto the screen when selected. Any ...
Betsy Petrovic's user avatar
0 votes
0 answers
72 views

Remove Wordpress Menu Classes and ID with Bootstrap Walker

How to remove generated WordPress menu classes and id and only keep the Bootstrap recommended ones without affecting the functionality of the Navbar. I found this code which looks good and I've ...
David Buik's user avatar
0 votes
0 answers
124 views

Having issue in wordpress website homepage showing invalid page and not showing url header section

Saloni here. My issue is with my WordPress website. Actually, I am working on my website, and in that homepage section, it shows an invalid page in the menu section, but when I open my website's URL ...
SALONI JOSHI's user avatar
1 vote
2 answers
25 views

How to determine if WP_Customize_Nav_Menu_Item_Setting is a 'taxonomy' type?

I'm following the answer given for Add settings to menu items in the Customizer. I'd like to inspect if a menu item is of type taxonomy. However, get_post_type returns nav_menu_item. How do I dig ...
Diana's user avatar
  • 103
0 votes
1 answer
52 views

Live site menu links pointing to staging site pages

We have recently published our staging website. However, the header menu links on the new live website are still pointing to pages in the staging site. How do I make links in the header menu on the ...
C2B593's user avatar
  • 1
0 votes
0 answers
46 views

nav_menu_css_class add_filter is never called

I try to use nav_menu_css_class filter with add_filter in worpress but it seems that it's not working ( i tried an echo or diein the function but never acces it). I just added a register_nav to add a ...
amir nadji's user avatar
0 votes
0 answers
47 views

Menu for all posts from multiple categories

This seems like a basic question but I couldn't find answer anywhere. I have 300+ posts and 15+ categories on my website and I'm unable to create a menu to link to all the posts from all categories. I ...
Nikita Gupta's user avatar
0 votes
0 answers
13 views

Wordpress menus: Change URLs

I am new to Wordpress. I use it with Avada and Avada Child Themes. I have not set up the site, I only administrate it. In the following I will name all pages (sites, products, calender, ...) as "...
deified's user avatar
0 votes
0 answers
130 views

Mobile submenu, only the little arrow next to submenu name is clickable

I am using astra theme on my website and have this problem: Mobile submenu link that has little arrow next to it, it expands revealing other submenu items when clicked. It is custom link that I have ...
Luka Pecanac's user avatar
0 votes
1 answer
658 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

1
2 3 4 5
65