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

Passing a variable in a customer url menu

I'm trying to add a link to my menu that leads to the following page: /ar/variable where the variable is the page the user is currently visiting for example: when the user is on page site.com/contact ...
0
votes
2answers
41 views

Hide menu item based on user's custom capability

I need to show one item from menu only for users that are logged in and have certain custom capability set. Is it doable from theme functions.php or it needs a custom plugin? Note: I already use ...
0
votes
0answers
25 views

How do I add this custom nav menu to my wordpress?

So I'm trying to recreate the nav menu over from stripe.com over on wordpress, and I found this tutorial. I haven't found any plugins that can recreate the stripe nav menu effect so I'm resorting to ...
0
votes
0answers
11 views

Hiding specific navigation menus from specific roles in admin panel

So what I'm trying to do is make 13 different user roles on my website and I have 13 different navigation menus. Each of these menus is displayed on the front end on separate pages. I need to let ...
0
votes
1answer
24 views

Parent menu item does not display posts when I add the sub-items

I have created 3 categories; Europe (as a parent category) and then I have two sub-categories Croatia and Wales. In Dashboard > Appearance > Menu I when I only add the category Europe as a menu item,...
0
votes
0answers
14 views

Restrict user to edit only edit a certain menu

I'm using a plugin (User Role Editor) to take care of the user roles. This works fine, except that you can't give a user acces to only a certain menu. I have two menu's in my website. One 'main' menu ...
0
votes
0answers
33 views

An error appeared in the console in the priority-menu.js

Im on WordPress engine latest version. The site maxg5.ru The console appeared errors in the file priority-menu.js. Because of this error in the mobile version, menu items are displayed in the wrong ...
1
vote
1answer
80 views

Remove pagination from WooCommerce product categories on admin edit navigation menus

I am creating a WooCommerce store with a very big nested menu structure. Is there a way to stop my product categories from paginating? I need them to all show in one big list so that I can use Ctrl+...
0
votes
0answers
9 views

hide submenu from dashboard, wp v 5.2

i know there are lot of threads and tutorials out there. but none has worked for me. i am trying to hide a submenu from "User". a plugin creates this submenu. my code is as below..... add_action('...
0
votes
0answers
13 views

How to make a section id menu w/multiple pages

I have pages with multiple sections like /about#section_one /about#section_two Thats how I add them in Menus under Custom Links but Wordpress changes to /about/#section_one (adding a slash ...
0
votes
0answers
24 views

How to add Buddypress user avatar to navigation menu item

So i have installed buddypress on localhost what i am looking to do is add user profile image (avatar) to navigation menu item something like this,
0
votes
0answers
19 views

Adding social icons to (copyright) menu

I have a copyright menu at the bottom of my page and I don't want this hardcoded in my theme. I want the admins of the site to be able to edit this. So I made a copyright menu which to this point has ...
0
votes
1answer
76 views

wp_nav_menu not working correctly in my underscores theme

I'm using a theme based on underscores, and I have registered my menus in the following way. function register_my_menu() { register_nav_menus( array( 'primary' => esc_html__( 'Primary' ...
0
votes
1answer
21 views

sidebar navigation problem with child pages not all display.?

Corsetería is parant pages and 25 sub pages. but display only 17 pages
0
votes
1answer
9 views

How to point menu to my homepage

So basicially i have a long-long homepage where you can scroll down and find a services section, if you scroll down more you see important informations and etc. but i have a menu. I want to make the ...
0
votes
0answers
30 views

Customize wp_login_form appearance

I embedded a login form in my websites header for not logged in users. I added it using this code in my navigation-top.php: <?php if ( is_user_logged_in() ) { ?> <?php } else { ?> ...
0
votes
0answers
379 views

How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme

I'm using the Understrap theme for Wordpress and looking to modify the default menu on mobile when the user clicks the hamburger menu. Essentially I am trying to get the menu to fully overlay the ...
0
votes
0answers
27 views

Dynamically populate Wordpress menu with custom taxonomy

I have a pretty long custom taxonomy and don't want to manually put it into my menu. Additionally I have to do it for 3 languages (using Polylang). Any ideas how it can be done dynamically?
-2
votes
2answers
20 views

How to change first letter of active menu item

Hello can anyone please give me the code, and tell me where to put it, for how to the change the first letter or the active menu item to red? thank you
0
votes
1answer
17 views

How to completely remove the top section with the menu?

I am using a child of Pixova Lite 2.0.4 on Wordpress 5.1.1 running on local machine to make a landing page. I want my header image to start from the very top of the page with no top menu section over ...
0
votes
0answers
10 views

adding drop down menu item to existing menu

I am a newbee ... so go easy on me :-) I am trying to create a home for sale site for my house. I have a menu across the top that among other this has a "gallery" selection. I would like to have ...
0
votes
2answers
60 views

Possible to add a dynamic link to a sub-menu via wp_nav_menu_items?

I have the following, which successfully inserts a dynamic link as the last top-level menu item of the specified menu: add_filter( 'wp_nav_menu_items', 'example_last_nav_item', 10, 2 ); function ...
0
votes
2answers
28 views

how to display a specific wordpress menu?

Below is my code: wp_nav_menu( array( 'menu', _('My Custom Header Menu'), 'theme_location' => 'my_custom_location', ) ); And as result, I obtain all ...
0
votes
0answers
31 views

How to give custom roles the capability to edit one Menu instead of every Menu

I would like to have a custom user role that can edit the Menu items under the Appearance tab. But I don't want my custom role to have the ability to edit every menu on my WordPress site. I only want ...
0
votes
0answers
51 views

Pages not displaying as sections on static page

I'm currently working on the Twenty-Nineteen theme. I'm trying to make each "page" display as a section on my homepage. This has worked in previous themes (i.e. Twenty Seventeen), however I'm clearly ...
0
votes
1answer
38 views

How can I show a custom WordPress menu anywhere I want on my website?

I went into Appearances > Menus and created my own menu called "default menu." Then I tried to include it in my WordPress theme, but was unsuccessful. I am trying to include it just before the footer. ...
0
votes
0answers
75 views

mobile menu not working with anchors

I'm using the Theme Free-blog (https://wordpress.org/themes/free-blog/) and the free version of mobile menue plugin http://www.wpmobilemenu.com So far it works fine but since I added an anchor in ...
0
votes
1answer
35 views

save_post() on Menu Save

When the wordpress menu is saved in the backend, functions hooked on to save_post() run. Is there a way to make these run only when singular items are saved, and not when the menu is saved?
-1
votes
1answer
102 views

Nav menu custom html:

I've been looking to the answers on this site, but they lack information on what files to edit and/or the path to them, and where or how you activate and can see the changes. For example, this ...
0
votes
2answers
93 views

Wordpress Menu Navigation links not working

Navigation Menu links not working, but the bootstrap CSS is working. Can anyone help me in getting the links working? Thank you <ul class="navbar-nav mr-auto"> <?php ...
1
vote
1answer
37 views

My Main Query Modification is Messing up my dynamic main - why?

This has been very difficult to track and I have enabled only the plugins I need (ACF and my own plugins that deal with content type creation). I noticed that on some pages, my menus were gone, this ...
1
vote
0answers
53 views

Automatically list top level menu item child pages

I am building a website that has a lot of pages. The client is not a big fan of the Wordpress menu builder works (in appearance -> menus), and we have come to the conclusion that the best way for the ...
0
votes
1answer
142 views

Walker class for sub-menu with ACF fields

Firstly, I'm wondering if this is the best way to even do this. I have a basic nav, one item has children. The children need to be wrapped in a container div and each child needs to pull some ACF ...
0
votes
1answer
49 views

Primary navigation menu with timed items from custom post type

I have created a site (livermorevalleyopera.com) for a client. I made a custom post type for events. In the primary navigation I have a top level menu item "Season Events & Tickets" and the ...
-1
votes
2answers
20 views

how to add fa fa icons customize menu using wp_nav_menu function?

how to add fa fa icons customize menu using wp_nav_menu function? wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'footer-menu', 'menu_class' => 'quick-...
0
votes
2answers
68 views

wordpress walker add class to submenu a href

I am having some troubles with my wordpress walker code. I know it's possible to add a custom css class manually via the admin menu section. But what i am trying to achieve is to get this done ...
1
vote
1answer
57 views

Is this best practice for Dynamically adding items to WordPress menus?

Is there an easier way too add this functionality to the menus page, instead of using the following code? Another words a different filter/hook/action that will make it, so I don't have to write ...
0
votes
1answer
110 views

set certain item in nav walker to active when on archive pages or singles

I have created an event custom post type and a link in my menu to the archive page for that event (/events). I'm using wp_nav_menu() to call the menu. When I'm on /events the menu has the ...
0
votes
0answers
29 views

Change markup for just 2nd list element in custom Walker menu

I have been struggling a bit with this idea. The thing I want to achieve is that all elements are regular dropdown but the second one is a megamenu styled item. And for that I have prepared markup ...
0
votes
2answers
22 views

Navigation menu not visible (contrast issue) on home page

I am very new on WordPress so my mistake should not be be too complicated. I did something to my site that the navigation menu items on home (landing) page hidden in the navigation menu here. If ...
0
votes
1answer
25 views

Must a page be published in order to be added to menu?

Must a page in WordPress first be published before it can be added to a menu? Or can it be created in draft and then added to a menu?
0
votes
0answers
20 views

How collect all taxonomies on one menu

I have some post_types, they have some taxonomies. I want collect all taxonomies on options page and. How collect all taxonomies on one menu "Options"
0
votes
1answer
131 views

choose selected for select option with condition [closed]

I have a select option like this <select name="select1"> <option value="value1">hots</option> <option value="value2">popular</...
0
votes
0answers
12 views

How to add a menu when user is logged in (via my own database table)

I am trying to let the user login via my own table that I created in phpmyadmin. I also am using an insert php plugin so that I can insert php into my code. How can I make it so the user can see a ...
0
votes
1answer
182 views

Bootstrap Nav Walker Sub Menu Image

I would like to add images to each item of my sub menu. At the moment, i've added a custom css class to each menu item in the wordpress admin dashboard and add to my css a class like that : .menu-...
1
vote
0answers
161 views

Custom Walker_Nav_Menu issue with variables on PHP 7.3

I've made this custom walker that extends Walker_Nav_Menu for "mega menu" implementation. It works perfectly fine from PHP 5.4 to PHP 7.2, however it it has problems on PHP 7.3. The idea is to compare ...
0
votes
1answer
126 views

PHP warning with code for nav menu walker [duplicate]

[UTC] PHP Warning:  Declaration of description_walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = ...
0
votes
1answer
51 views

Add element after navigation element title don't works like I expect

I'm currently trying to add an empty <span> after every item title in my navigation which has childs. So only dropdown elements. Sadly also some of my non-dropdown items getting a <span> ...
1
vote
1answer
145 views

Using a shortcode to create a dropdown menu from wp_nav_menu list items

I'm using the following function that I found online to render each page's individual nav items to the page: function print_menu_shortcode($atts, $content = null) { extract( ...
1
vote
2answers
71 views

How to have the Header show different content on different pages?

I made a Navigation (primary) via Appearance->Menus which navigates the user to anchor tags on the side, but I also have subpages, where I want a different navigation - only with my 'Home'-button in ...