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.
3,202
questions
0
votes
0
answers
11
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 "...
1
vote
0
answers
16
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 ...
1
vote
0
answers
8
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 ( ...
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 ...
3
votes
2
answers
105
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 ...
0
votes
1
answer
32
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 ...
1
vote
0
answers
33
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 ...
0
votes
0
answers
30
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....
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=&...
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();
$...
0
votes
0
answers
35
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 ...
0
votes
1
answer
71
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 ...
0
votes
1
answer
14
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 ...
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
...
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');
0
votes
0
answers
15
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 ...
0
votes
1
answer
60
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 ...
0
votes
0
answers
9
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 "...
0
votes
2
answers
173
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 ...
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-...
0
votes
1
answer
55
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 ...
0
votes
1
answer
59
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-&...
0
votes
0
answers
44
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 ...
0
votes
1
answer
123
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 ...
0
votes
0
answers
9
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 ...
0
votes
0
answers
34
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 ...
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 ...
0
votes
0
answers
20
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.
0
votes
0
answers
22
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 ...
0
votes
0
answers
22
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 ...
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 ...
0
votes
0
answers
65
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 ...
0
votes
0
answers
89
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 ...
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 ...
0
votes
1
answer
45
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 ...
0
votes
0
answers
44
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 ...
0
votes
0
answers
40
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 ...
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 "...
0
votes
0
answers
122
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 ...
0
votes
1
answer
542
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 ...
0
votes
1
answer
101
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 ...
0
votes
0
answers
76
views
Customize when the mobile menu triggers in WP 6.2.1
I am trying to customize when the default WordPress mobile menu triggers. It appears right now that the responsive menu kicks in at min-width: 600px. I would like it to trigger at 800px.
I was hoping ...
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 ...
0
votes
0
answers
19
views
Country selection / country-specific menu
Client makes a malaria drug and it has a few pages that are for specific countries only that will be rather boring for a user to select again and again that they want to see e.g. the information for ...
0
votes
1
answer
61
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 ...
0
votes
1
answer
21
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 ...
0
votes
0
answers
14
views
Unable to order my menu by dragging
I see many have had a similar issue but haven't yet found the answer to my problem specifically.
I am unable to order my Menu through Appearance > Menu and then dragging the items.
I can only order ...
0
votes
1
answer
367
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 ...
1
vote
1
answer
176
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 ...
0
votes
0
answers
28
views
Custom Menu (only showing direct cildren) ACF not showing
I have working codes for both problems, but can't combine them.
following code adds the acf in a standard menu:
function my_wp_nav_menu_objects( $items, $args ) {
// loop
foreach( $items ...