All Questions
Tagged with page-menus or menus
3,219 questions
0
votes
1
answer
94
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
62
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
118
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
1
answer
2k
views
How to automatically generate custom menu item from categories?
I would like to display all my category items under a single parent but I failed to do so now I'm creating a new menu link for each category and dragging it into place in the custom menu screen. Is ...
1
vote
3
answers
5k
views
has_children in custom nav_walker
I am trying to create custom menu nav walker. I added below code
function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output )
{
$id_field = $this->...
0
votes
1
answer
937
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
129
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
1
answer
14
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 ...
8
votes
3
answers
10k
views
Adding a custom field to the site identity menu
It seems by default WordPress provides fields for site-title and tagline.
I understand how to add (for example) the option to chose a logo, adding add_theme_support( 'custom-logo' ); to the functions....
0
votes
2
answers
375
views
How to select particular menu position in wordpress?
I have 3 menu positions primary, side and footer in functions.php. ho do i select side menu position and add condition to that menu only?
function abc_menus() {
register_nav_menus(
array(
...
0
votes
1
answer
78
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
49
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 ...
1
vote
2
answers
919
views
Unique icons next to each Wordpress menu item
I have Wordpress menus that is seems are put together in the backend somehow. I used wp_nav_menu() to customize the wrap of the menu items slightly.
My issue is I have found no direct access to ...
1
vote
3
answers
6k
views
Highlight current category, when using get_categories
I'm successfully using helgatheviking's answer from this post: Show children of top level category only See code below:
// get the category object for the current category
$thisCat = get_category( ...
0
votes
1
answer
638
views
Importing large product categories into wordpress menu
I have imported a product dataset into Wordpress/WooComerce which has created the required categories and sub-categories correctly when viewed in the Product->Categories page.
When I go to try to ...
0
votes
0
answers
40
views
Is there a way to make it so that I don’t get a hamburger menu, but rather a desktop style nav, when resizing to a mobile size
I only have a few menus in my nav, and I don’t think a hamburger menu has the appropriate look for my mobile site.
Anyway to force it to look like it does on the desktop?
1
vote
4
answers
20k
views
Get menu item slug
I use custom menus and I’d like to get the menu item slugs.
Is that possible?
// Get the nav menu based on $menu_name (same as 'theme_location' or 'menu' arg to wp_nav_menu)
// This code based on ...
4
votes
7
answers
30k
views
How to hide an item from a menu to logged out users (without a plugin)
I want to hide an item from a menu if a user is logged out.
I am currently using the below code that achieves this using two separate menus, but to save duplication, I would like to only have to ...
0
votes
0
answers
49
views
Nav menù doesn't display selected pages
I've included Elementor inside my custom plugin and now I'm creating my wp site layout.
I've noticed that my nav menu will show all the pages I have created for my website, but from the settings I've ...
4
votes
6
answers
7k
views
Exclude Private, Draft pages from Primary Nav when using custom menu
I'm looking for ways to prevent "private" and "draft" pages from appearing (to non-logged-in admins) in a site's Primary Navigation menu which is based on a custom menu - other than manually removing ...
0
votes
1
answer
91
views
How to add more than one menu for logged in members?
I have the following code to show different menus to logged in members. I would like to add a second menu to be displayed when logged in, for a total of 3 menus, as there are two different menu areas ...
0
votes
1
answer
634
views
Critical Error when editing menu
I am having an issue debugging what appears to be a WP core issue.
I am observing the following behavior when attempting to edit menus, see below for context
I checked the error logs and the ...
4
votes
4
answers
48k
views
How to get a different mobile menu than desktop menu in the twentytwelve child theme
I would like to use a different menu for my mobile website than my desktop website. With different I mean the content not the layout. I just want to use the mobile menu of the twentytwelve theme.
...
0
votes
1
answer
126
views
Footer navigation menu
Our website is https://de.ferberg.com and we are a manufacturer of warehouse equipment and mobile loading ramps. On our site the navigation menu is added to the footer via code and theme editor, it is ...
3
votes
2
answers
3k
views
automatically placing custom post types singles into submenu of main nav menu
I'm looking around and see some hints at what I'm wanting to do may be possible, but it's just not clicking for me.
I have a custom post type rt_doctors. I'm trying to make it so there will be a ...
0
votes
1
answer
46
views
Icon not shown in Dropdown menus in Twenty Seventeen Theme
I guess I removed the image used for the dropdown menu while cleaning up my site that uses the Twenty Seventeen theme.Now it shows nothing (or a box) next to a dropdown menu which is not ...
1
vote
1
answer
66
views
Submenu items not working anymore
Not sure where I am going wrong here... Submenu items in my website have stopped working across entire site with custom links/anchor tags.
Examples:
https://bell.works/new-jersey/on-the-block/
(Sub ...
0
votes
0
answers
98
views
Control page access based on User Meta data?
I want to control access to pages (and menus) based on whether the viewer has a value in a user meta data field.
I've made a plugin that securely receives viewers from another private system where ...
0
votes
1
answer
142
views
How does one add numbers to an admin menu?
I am trying to make a plugin and want to surface concerns in the admin panel menu row for my plugin, similar to the below screenshot from Wordfence.
I have searched around Google, but all point me to ...
0
votes
0
answers
30
views
How to change WP menu item type?
There seems to be no way to change menu item type from page to custom in wp admin. How can I do this? If I have big menu it’s very cumbersome to build these always by hand… Type change should be in ...
0
votes
1
answer
69
views
How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
When creating a menu, and after selecting a page as front page and another page as posts page..it appears next to the page in menu screen. For example, "Front Page" appears next to home page,...
0
votes
0
answers
25
views
Profile Image displaying on Wrong side of Wordpress Navigation Menu
Am creating a WordPress site whereby am enabling users to upload their own custom profile images from a custom form. Once they upload am storing the image URL in a database table and the image is then ...
0
votes
0
answers
65
views
Displaying a Custom Avatar in WP Bootstrap Navwalker Menus in Wordpress
Am creating a WordPress site whereby am enabling users to upload their own custom profile images from a custom form. Once they upload am storing the image URL in a custom database table and the image ...
0
votes
1
answer
140
views
Add CSS class to posts with certain meta key
I am working on my header navigation and I want to underline the menu item for certain conditions.
I would like to add a CSS class if
the post has the ID 21638, or
the post has the meta value 'bloom'
...
2
votes
1
answer
911
views
How to add custom menu to block theme?
I'm creating a theme based on the 2023 block theme from WordPress 6.1.
I need to create a custom menu as the built-in one is too limited for me.
I initially thought I can just enter the menu under &...
3
votes
3
answers
5k
views
Remove nav menu or menu item
I try to remove a nav menu programmatically but I didn't find the way to do it. I knwo how to create it but I don't know how to delete it...
I've got the menu name and I wan't to delete it like in wp ...
2
votes
1
answer
532
views
Twenty-Twenty-Two Child Theme Mega Menu
I’ve got a limited knowledge of CSS. What I know I've learned while programming. That said, I’m working with the Twenty-Twenty-Two theme. I’m trying to add a mega-menu to my child theme. The ...
3
votes
1
answer
3k
views
Show a WP 3.0 Custom Menu in an HTML Select with Auto-Navigation?
As part of a theme for a client, I want to be able to show a custom menu (defined via the admin) in a select box that automatically changes pages after changing the selection.
Is there a plugin (or a ...
0
votes
0
answers
148
views
Call wordpress function through functions.php when pressing menu
I have created a menu through wordpress admin menu creation but I'd like to call wp_cache_flush() when I press every menu item... is there any hook I can call through functions.php so I can execute ...
1
vote
1
answer
789
views
Where to implement custom walker class?
I have created a custom walker class for changing the output of menu items. Where do I place my custom walker class file at? I have tried to ask on the Wordpress forum but it has gone 3 days with no ...
1
vote
0
answers
144
views
How do I get the menu items based on name or ID?
I have this code that gets menu items, currently it works using slug-id (main-menu)
$menu_name = 'main-menu';
if (($locations = get_nav_menu_locations()) && isset($locations[$menu_name])) {
...
-1
votes
1
answer
1k
views
How to let mobile navigation menu close when link is clicked?
I am using a wordpress theme and i wanted to change the navigation menu to a one-page navigation menu. I already made everything work except when i am using a mobile the menu does not close when i ...
-1
votes
1
answer
867
views
Customize Walker_nav_menu to show posts if item is category
I would like to customize the nav menu walker so that when it encounters a category it automatically makes the 5 most resent posts children of the menu item. Is there a way to dynamically add items ...
-1
votes
1
answer
1k
views
How to add custom nav_menu_css_class to certain menu only?
I want to add a custom CSS class to menu items. So far, I got it working by using the filter hook nav_menu_css_class.
However, I want to add this class to items of a specific menu only. So, how must ...
1
vote
1
answer
27
views
Custom e-commerce display for specific users [closed]
I am starting to build a WordPress website, with one specific functionality I’m struggling with.
The business sells custom, recurring products to industrial customers. So, the desire is each customer ...
-1
votes
1
answer
43
views
How to add different menu items on different menus?
This may sound weird, but I need to add different menu items to two specific menu types. When I mean different menu items, I mean, the items I set to main (header) menu are only for that menu and the ...
0
votes
1
answer
500
views
How to set menu Display location
I have created a menu and I have the ID.
$menu_id = wp_create_nav_menu( 'Main Menu' );
And I have registered a navigation menu location:
register_nav_menus(
array(
'menu-header' => '...
-1
votes
2
answers
1k
views
Change header menu login-logout without changing main menu
I'm trying to change the header menu, such that it looks different when it is logged in and logged out, without changing the main menu.
function my_wp_nav_menu_args( $args = '' ) {
if( ...
4
votes
3
answers
5k
views
wp_nav_menu() doesn't apply correctly classes and IDs to menu and container
I wrote this simple code to prove what I'm saying:
wp_nav_menu( [
'menu' => 'Primary Navigation',
'menu_class' => 'this-is-the-menu-class',
'menu_id' => 'this-is-the-menu-id',
...
2
votes
0
answers
878
views
Add acf custom fields so sub item in menus
Please, can anybody help me, I've been struggling so long with this
Basically, I want to add custom fields to sub menu items, I want to add an image and a link. I can see fields showing up in sub ...