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
0 answers
6 views

Dynamic nav menu with icons [closed]

I want to convert this HTML site to Wordpress using Elementor. as you can see all navbar links have their own icons, I can design it by sepread icon and text below it but also I want it to be dynamic (...
  • 1
0 votes
0 answers
7 views

Hiding Widget On Mobile Devices Removes Our Product Search Box On Mobiles

We have a live search product bar on our website, which sits in the right hand sidebar on desktop versions, and we have some custom css which places it at the top on mobile devices, as it would ...
0 votes
0 answers
8 views

change breakpoint widths for divi theme tablet view

Is there a way to start css for tablet at a higher width than the standard breakpoint width? My desktop header-nav breaks before turning into a dropdown. Is there a way to add css so that my header-...
  • 1
0 votes
1 answer
6 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 ...
0 votes
0 answers
8 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
11 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
14 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 ...
  • 1
1 vote
1 answer
23 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
1 answer
26 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
14 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 ...
  • 1
0 votes
0 answers
13 views

Get_avatar filter hook not displaying custom avatar image on frontend

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 ...
  • 1
0 votes
0 answers
21 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 ...
  • 1
0 votes
1 answer
50 views

Displaying an Uploaded Image as a Custom Avatar 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 database table and the image is then ...
  • 1
0 votes
0 answers
21 views

Menu problem : when add wordpress element in menu it convert into empty custom link

Problem comes after a migration of wp_posts table in SQL (import of this table from another database). When I add page in menu (Appearance -> menu) and click on save then it converts into custom ...
0 votes
1 answer
44 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
52 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 ...
  • 123
0 votes
0 answers
26 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 ...
  • 103
1 vote
0 answers
21 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 vote
1 answer
23 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 ...
  • 13
-1 votes
1 answer
33 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 ...
  • 109
0 votes
1 answer
13 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' => '...
  • 125
0 votes
1 answer
74 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 &...
  • 141
1 vote
0 answers
75 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 ...
0 votes
0 answers
13 views

get menu name for the current displayed page

I need to get the current menu name/id for the current displayed page so that a different logo can be displayed based on the pages current menu. I have one site that shows two different clubs, each ...
0 votes
0 answers
8 views

Wordpress menu is getting automatically nested

I am trying to set up a hierarchical menu for my website but, the menu items are getting nested automatically to their parent item. I cannot change the placements once it gets nested. I am providing a ...
0 votes
0 answers
7 views

Add a page to a subscribers account

Would like to add an Authors page to each subscribers account 'automatically' that they could update daily, and could be viewed, along with their profile by other subscribers.
0 votes
0 answers
12 views

Add featured posts to nav menu

The nav menu I'm bulding needs to have blog posts inside of it, so on the left there would be classic nav items (links) and on the right there would be three posts with an image, see image: I have no ...
1 vote
0 answers
25 views

My wp_update_nav_menu action is firing twice

i am trying to setup a wp_update_nav_menu action in a Plugin. Now I wonder why this is firing twice. I want to update all my pages with this hook in a headless wp implementation. And this double ...
0 votes
0 answers
24 views

Dynamic Menu Item

I'm a complete WordPress n00b, so your guidance is very much appreciated. Long story short I am running a theme with a child theme attached. I need a function that will retrieve my site's latest post ...
0 votes
1 answer
88 views

Get Menu Items from REST API (React)

I'm a bit rusty on the WordPress since version 5.9 but I can see that they've added Menus to the REST API and we can use new get methods in: wp.data.select("core"). I'm trying to get the ...
0 votes
0 answers
23 views

Wordpress removes URL parameters from menu elements when saving the menu

I'm trying to add some submenu elements to interact with a shortcode in my page. The shortcode is a tabbed group and the following URL opens a specific tab: https://wp1.samuelezappala.it/?tab=prestito-...
2 votes
1 answer
144 views

Any way to use classic Menus in Full Site Editing?

I use an FSE theme and as you might know the Navigation block is pretty limited. I want to implement a custom mega-menu-ish navigation for a big website. Is there any way to enable the Appearance->...
0 votes
0 answers
29 views

What is the best way to incorporate responsive dropdown navigation menu into custom theme?

I am very new to developing and just started with building a custom theme. I already registered a menu using the wp functions (register_nav_menus etc.) and am now trying to get my sub-menu to work. ...
1 vote
1 answer
15 views

Problems with draft website pages

I set up all the pages for my website (set as public & DRAFT) (https://9v7.961.myftpupload.com/?page_id=50) - BUT - lots of stuff not working (menu shows no pages, cannot link to Posts, custom ...
  • 11
0 votes
0 answers
27 views

Menu Structure and URL structure, with Pages and Post-Type-Posts

I have some szenarios where I'm stuck. I'm asking from a perspective of someone who can code and wants to avoid using plugins. If you want your menu to have this structure: Events (custom post type ...
0 votes
0 answers
9 views

Sub menu for a (single) page

I am looking for a way that let's me subdivide a page with a pagination-like menu. However, I want to name the menu-items (no numbers...) and don't want the entire page to refresh when clicking on a ...
0 votes
0 answers
19 views

Database structure Menu Item

I want to write the menu items into the database using a program. I also saw the structure of the database here, but I don't understand the dependency of the menu items. I also created a test menu ...
  • 1
0 votes
0 answers
19 views

Custom Nav Walker $item->url producing malformed hyperlinks

Using the following: class mandoe_menu_walker extends Walker_Nav_Menu { function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0) { global $wp_query; ...
  • 1,666
0 votes
2 answers
36 views

Declaration of mandoe_menu_walker::start_el(&$output, $item, $depth, $args) must be compatible with Walker::start_el(...)

I've originally hard-coded menu links into the mega menu of mandoemedia.com in order to achieve the icon and description of each link. I'm wondering if it is possible to convert these submenus into ...
  • 1,666
0 votes
2 answers
12 views

Remove Unused Menu Locations

I added two menus register_nav_menus ( array( 'primary_menu' => esc_html__('Primary Menu', 'sre'), 'footer_menu' => esc_html__('Footer Menu', 'sre'), ) ); But I'm unable ...
  • 103
0 votes
0 answers
42 views

how to add permalink/slug to wordpress custom link menu item

In WordPress wp-admin navigate to : Appearance > Menus > Add menu items > Custom Links in Custom Links we can add a CSS ID in the URL field, example : in another page, i have html tag ...
1 vote
1 answer
13 views

Displaying list of random links using wp_nav_menu

Is it possible to modify wp_nav_menu to display a list of random links? I tried adding 'orderby' => 'rand', but that didn't do anything. I'm afraid my PHP skills are rudimentary, at best. The rest ...
0 votes
0 answers
20 views

Custom Navigation Bar JSON Syntax Error in JSON at Position 0

I am adding a custom nav bar thanks to this awesome guide by Pressidium! I have tried contacting the author but they aren't responding. Things started to go awry after editing the functions.php, like ...
0 votes
1 answer
30 views

Adding conditional classes to wp_get_nav_menu_items

I am using wp_get_nav_menu_items to display my header menu with the code below <?php $menu_name = 'main-menu'; $menuitems = wp_get_nav_menu_items($menu_name); ...
3 votes
1 answer
91 views

Is it possible to know which menus are owned by a plugin?

I'm building a plugin that needs to generate a list of active plugins along with the menus that were created by each plugin. After browsing core I couldn't find anything that would associate the ...
1 vote
2 answers
420 views

Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function

I am working on a website with 700+ pages. Most of the pages have similar keywords/slugs. Using the traditional Appearance > Menus editor is nearly impossible because I can't find the pages I am ...
  • 478
0 votes
0 answers
11 views

Customize Widget Navigation

How is it possible to customize the footer menu that has been added via widget and not defined in the functions file? I'm looking for a way to remove the container and add a predefined icon for the ...
0 votes
1 answer
29 views

How are methods of class Walker_Nav_Menu invoked?

The class has a method called start_el which runs displaying the menu items without invoking it. Don't you have to invoke it like so: $example = new Walker_nav_menu(); $example -> start_el(args...);...
0 votes
1 answer
62 views

wp_nav_menu removing containing UL with 'items_wrap' => '%3$s' not working

I am attempting to combine two menus into one so I would like to use wp_nav_menu without the uls wrapping the list items. I have found several questions that say this can be done by setting '...
0 votes
0 answers
25 views

Efficient wp mobile menu

I have started developing my very own theme, im kinda new to wordpress development so i would like some help/advice. I started with the menu by using bootstrap which works fine with wordpress, now ...
  • 1

1
2 3 4 5
64