Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
17 views

Combine multiple menus using the filter wp_nav_menu_items

Is there a way to combine multiple menus in the functions.php file using wp_nav_menu_items()? I need to hook in a second menu to the main menu. The site has two separate menus in the header. One is a ...
0
votes
1answer
11 views

Inserting PHP before a menu element, while using the inbuilt menu function wp_nav_menu()

This is tricky to word so bear with me please. I have generated a wp_nav_menu, menu-1, as the main-menu. The menu is quite complex compared to a basic b**** one. Whereby you can show and hide parts ...
0
votes
0answers
17 views

Add base category as a first dropdown item in a bootstrap based category menu with dropdowns

I'm using a wp_get_nav_menu_items filter to automaticaly add sub categories to a categories menu. here is the code : add_filter("wp_get_nav_menu_items", function ($items, $menu, $args) { if (...
1
vote
0answers
7 views

Add media library items to Menus using the Customizer (via Media Manager not URL)

You can add links to files in the media library URL via the Custom Links panel of the Customizer but for clients this requires multiple steps including cutting and pasting a URL from the media library ...
0
votes
0answers
25 views

Bootstrap Wordpress Middle Navwalker Logo

I'm trying to add my logo in the middle of my navigation, but I think it's not the best way to do that. Currently, I have two menus (left and right), but it will more simple for responsive to add my ...
0
votes
0answers
10 views

Use custom field content in menu-item

I'm making a mega-menu with some menu-items that can have a more rich content (from a wysiwyg editor using ACF custom fields). So, i have set an ACF field group to work with menu items, i need that ...
0
votes
0answers
20 views

Swap menu or menu item based on link click ( user input )

I maintain a website for the production company I work for. I'd like to display in the main menu a specific director list based on whether the user has clicked either AU or NZ. This will be a link in ...
-1
votes
0answers
11 views

How to include svg sprite icons into submenu as a decoration? Below I showed my menu that svg needs different [on hold]

function _t_dropdown_icon($title, $item, $args, $depth) { if($args->theme_location == 'main-menu') { if(in_array('menu-item-has-children', $item->classes)){ if($depth == 0) { $...
0
votes
0answers
19 views

How to disable sub menu items from being created?

In WordPress under Appearance > Menus there is the visual menu builder where you can "indent" items to make them sub items of another menu item. I would like to disable the ability to make items sub ...
0
votes
0answers
12 views

Mega Menu Plugin with More Depth [on hold]

Suggest Some Mega Menu Plugin(Free or Pro) which includes more Depth like E-commerce Mega menu . Normally Mega menu Plugins have only 2 or 3 depths
0
votes
1answer
24 views

Convert html menu to WordPress

I am new to WordPress but have used an online tutorial to take my HTML5 theme and copy it to a WP theme. As the WP blog is currently a part of the html site, it is necessary for the themes to function ...
0
votes
0answers
11 views

Woocommerce - Show subcategories in navigation when on category page

My main navigation is the list of categories, when you click on a category, I want the navigation to show the subcategories instead. I am unsure of where to start, so any pointers would be great. I ...
0
votes
2answers
29 views

Menu walker: how to tell if a sub menu contains submenus?

I mean: <ul> <li> <ul class="sub-menu"> <li> <ul> <li></li> <li></li> <li></li> ...
0
votes
1answer
26 views

Theme development - Automatically menu creation

I've been working for a couple of days with automatic creation of menu upon theme activation in wordpress. I've achieved the creation of menu and it's working as expected, except i want to add sub ...
0
votes
1answer
18 views

Replace Home with image link inside custom header menu

What I want to achieve is a header menu like this: Right now, I have this: I am not far off. To get to where I am currently at, I followed these instructions and added some custom CSS. So I added ...
0
votes
0answers
13 views

Show Custom field value instead of title in WP Menu

any idea how to display custom field values (I am using acf for those) in a Wordpress Menu instead of the respective wp_title? Have nothing to show, as I have nothing tried yet, as I haven't found ...
1
vote
1answer
30 views

WP /wp-admin/admin-ajax.php produces 404

Our site has been working fine in the last week. Today, I can't add a new page to our menu. Clicking "Add to Menu" just produces a spinning icon that never disappears. If I look at the Chrome console,...
0
votes
1answer
22 views

How do add a menu with levels within page

We've managed to add a menu into a page: https://www.wpbeginner.com/plugins/how-to-add-wordpress-navigation-menu-in-posts-pages/ How though do you make it function like a normal menu that is in the ...
0
votes
0answers
29 views

Bootstrap Wordpress Custom Menu Item and Navwalker [closed]

I am building a wordpress theme with bootstrap and I am using this navwalker to display the menu so that it uses bootstrap. Now the thing is that I also added another menu item (it's a link to cart, ...
-1
votes
0answers
6 views

Woocommerce Storefront Menu Styling

I'm trying to customize the handheld navigation menu for Storefront so that it has a border however this applies a border to the div which is visible even if the menu isn't active/loaded/expanded. ...
0
votes
0answers
14 views

String replace for Login/Logout concatenation problem in menu

I must be having another senior moment. The following code has been working fine for me for -years-. I applied it to a site using 4.9.2 with a child theme of Twenty Seventeen and it fails in a ...
0
votes
0answers
6 views

Multiple Home Options in Page Menu Items in Wordpress

Hi i have Home as an option 3 times when arranging my menu in Wordpress. I have no duplicate pages, I have tried deactivating all the plugins etc. Want just the right one left and delete the 2 ...
1
vote
1answer
91 views

How do I create page navigation linking to each H2 within the page? [closed]

I require each page on a WordPress site that I'm developing to have page-level navigation linking to each H2 on the page. How do I best automate this?
0
votes
1answer
13 views

Build a one-page navigation within a non-one-page ttheme…

My theme is not a one-page theme. Nevertheless I would like to have on one page of my site a one-page navigation. For example: In primary menu I have "About us", "Responsibility", "Our offer"… "...
0
votes
2answers
15 views

Homepage is not loading

I have developed my wordpress site locally and now it's live on a host. Everything is working fine, but when I click the Home button on the top menu it goes to localhost/wordpress, not to my exact ...
0
votes
0answers
13 views

Wordpress custom nav menu link not working [closed]

I've added a custom link to an external website in my wordpress menu. If I open it in a new window, the link are opened, but if I try to click on it from the wordpress nav it will not work. It seems ...
0
votes
0answers
15 views

Creating selective blog menu

I am trying to create a blog top menu where people can click on categories and all the posts within that category will appear. For example, similar to www.danlok.com/blog. I would preferably have it ...
0
votes
1answer
20 views

Where can I edit the Categories Menu ITem?

Where can I edit the following Categories Menu Item? I've tried to edit it in Appearance-Menu, but there is no option to edit the Categories tab.
0
votes
0answers
10 views

odd issue at navbar positionings

So something causes main navigation to not be displayed, it flexes out ok but I'd still need top items be constantly visible. overflow: visible does not fix this nor does z-index, nor removal of ...
0
votes
1answer
26 views

How to add custom li item to wordpress menu

I have tried to add custom li to my wordpress header menu using functions.php. Here is my code in function file. function register_header_menu() { register_nav_menu('header-menu',__( 'Header Menu' ...
0
votes
1answer
12 views

How to build a menu that change style over a section

create this menu : https://goldkant.de/ this is not wordpress but i want to do it on WP. exist a plug-in to help me that i ignore? the most curious thing is that: the menu is changing syle when it ...
0
votes
1answer
25 views

Disable Mobile Menu, (always show desktop menu)

I’m having trouble with something. I have a (almost) one page website with only my logo in the header/top-bar but no other menu items. But when i see my site on a mobile device it does switch to a ...
0
votes
0answers
22 views

custom taxonomies menu

I have added 3 custom taxonomies. I would like to add the taxonomy Titles to my menu? I can add the terms but it is the actual names (Globale Nachhaltigkeit, Regionen and Medien) of the taxonomies ...
0
votes
0answers
28 views

Wordpress menu not loading in the admin side appearence-> menu tab

Uncaught ReferenceError: columns is not defined load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-draggable,...
0
votes
0answers
33 views

Hiding Woocommerce categories from a menu if empty

I want to hide empty categories in a specific menu I found this code, but it hides some of my pages too. Can I some how restrict it to only hide in a specific menu? function ...
0
votes
0answers
15 views

Set anchor to page title

I have set up my menu so that they are all individual links. This way I am able to use an # anchor to jump to the text. For that I use an old style a tag with name= attribute that I set using the code ...
1
vote
1answer
19 views

Is this format possible with a custom Nav Walker class?

I'm looking to have the following output on a wordpress menu <nav> <a href="#">Link</a> <a href="#">Link</a> <aside> <a href="#" class="custom-class"&...
1
vote
1answer
12 views

Adding posts to custom menu [closed]

I can’t see a “posts” box to check under the screen option of my custom menu. Help please. I’m lost.
0
votes
1answer
16 views

wp_nav_menu() | Outputting my own custom code using built in features

I have created (more so WordPress has) using this: <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'menu_id' => 'primary-menu' ) ); ?> It outputs this: <...
0
votes
1answer
14 views

Sub Menus will not work

I am desperately needing help. I have done everything to my knowledge to try to get my sub menus back on my website. I installed a meta slider plugin to get a slider on my homepage. It worked well and ...
0
votes
0answers
11 views

Appearance Menu - Add new items to the top of the menu

When adding a new new menu item on the appearance menu page (/wp-admin/nav-menus.php) is it possible that when you click the Add to Menu button that the new item would be added to the top of the menu ...
0
votes
1answer
19 views

How to make menu country specific?

How to make WordPress menu country specific? Like I want to show one menu for only one country and hide it from rest of all. Don't want to purchase a plugin. How to do it with code customization?
0
votes
0answers
16 views

Using walker to display all menu branches at once?

So i have need to get all submenus displayed at once on site and could use little help to customising walker for task. Menu displayed like this: menuitem1 menuitem2 menuitem3 menuitem4 sub1.1 ...
0
votes
2answers
32 views

Wordpress “add to menu” button not working

I moved my WordPress installations from my old server to a new one. I copied all databases..etc and things seem to be working fine. (I have already migrated servers before, so I guess I know how to do ...
0
votes
0answers
11 views

WordPress Menu Item Script Dropdown Login

I have a client I'm redoing a website for on WordPress and I'm trying to implement a login system that when they click on the menu item at the top of their website, it has a login that drops out and ...
0
votes
3answers
56 views

WordPress custom Nav Walker

I want to convert my navigation menu into WordPress. tried with lots of snippets. But something I am missing. Here is my menu example html: <div class="menu"> <a class="some-class" href=...
0
votes
1answer
21 views

Creating navigation out of specific IDs and their children?

I'm looking for a way to list three specific pages in a nav-menu (I want to get these pages by their unique page ID's), and also list the children of these three pages - appended to each list item, in ...
0
votes
0answers
17 views

Creating navigation menu out of page-related parent/child/grandchild relationships

I am trying to create a sidebar navigation menu, that detects what pages are related to the page you are currently viewing, and then outputs the whole hierarchy of this family-tree inside a tiered ...
0
votes
0answers
24 views

Hide menu item when users are logged in/out

I want to be able to hide the 'My account' button when users are logged out and I want to be able to hide the 'Registration' button when users are logged in. How would I go about doing this? I'm ...
0
votes
0answers
27 views

Custom menu attributes (wp nav menu)

I've created my own set of menu attributes function menu_post_meta_fields( $menu_item ) { $menu_item->icon = get_post_meta( $menu_item->ID, '_menu_item_icon', true); $menu_item-&...