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
12 views

set page submenu current menu active php

I'm using a Nectar's Salient WordPress theme,and I'm encountering a frustrating issue in attempting to modifying page sub-menu like this ,i did a page and i set it to woocommerce my account page (...
0
votes
0answers
11 views

Replace the page url with a menu link?

i want to make a multilangual site, where the secondary language is a copy of the site in a different folder. For example: Primary language url: example.com Secondary language url: example.com/en So ...
0
votes
0answers
11 views

How can I have main menu item and first submenu both go to the custom post list? Using add_menu_page and add_submenu_page

I have a custom post type named slideshow. I'm using add_menu_page to add the main menu item, and add_submenu_page to add some submenu items. In the first call to add_submenu_page the slug property is ...
1
vote
1answer
21 views

Replace menu links with # and add name to its li

I have a wordpress menu: <?php wp_nav_menu( array( 'theme_location' => 'menu-categorias', 'container' => 'ul', 'menu_class' => 'navbar-nav dragscroll' ) ); ?> Which ...
0
votes
0answers
5 views

Hook to Rewrite Menu items titles on saving menu

Ok I have the following code in WordPress functions.php. To replace all menu title with "test". This is working fine. But i want to have this functionality only when I save the menu on the ...
0
votes
1answer
16 views

CTA button that is only visible to some of my users

I want to create a CTA button/menu link that will only be visible to people that haven't bought a certain product on my site. The button shouldn't be visible to subscribers that already bought the ...
0
votes
1answer
13 views

Bootstrap Menu bar shows up a toggle in Desktop Mode

I designed a new theme in WordPress. I used Bootstrap Menu bar for responsive design but shows up a toggle in Desktop Mode. <div id="nav"> <nav class="navbar navbar-default ...
-1
votes
0answers
17 views

unable to remove footer menu items

I'd like to remove the search field and Pages list from the footer of this post: https://germancase.com/adjektivendungen/ How do I do it? Thanks
0
votes
0answers
42 views

insert an HTML element if there is a submenu only

I am trying to insert an HTML element "an arrow or a checkbox" to make use of the "checkbox technique" so I can use it to expand the submenu "only if submenu is there" ...
0
votes
1answer
9 views

Header menu aligned right on all pages except for single-post page [closed]

I have a header with a logo, menu items and a search bar. I have aligned the menu on the right (close to the search bar), but in the 'single-post' page, the menu items appear on the left, starting ...
1
vote
1answer
11 views

How can I add a link to a WPForms “contact us” form to the main menu?

I created a basic WordPress site with a main page and a menu on it. WordPress allowed me to add links to pages. But I cannot find a way to add a link to a form created in WPForms. My goal is to have a ...
0
votes
0answers
20 views

Add class to sub-menu from unrelated element

So I'm trying to add and remove a class to a sub-menu when clicking an element that is separate. My structure is: <li id="menu-item-315"><a href="#">Sample Page 1</a&...
0
votes
0answers
18 views

Cannot collapse a responsive menu in Wordpress

I am new to website development so I am testing with some responsive menu to see how it works in Wordpress. I have selected this menu and it works perfectly in the demo. Yet, when I apply the code to ...
0
votes
0answers
13 views

Edit Dropdown menu parent element color

So I'm using the theme Hestia (free version) and I want to change the pink color by default that the text of the parent link gets (you can see PROJECT)
1
vote
0answers
13 views

How to get the element ID from new menu list that added with add_filter()?

I wanna ask how to get the element ID (with javascript) from new menu list that added with add_filter() ? So i'm trying to make a plugin that insert new menu list with add filter like this : ...
0
votes
0answers
14 views

website menu is not opening on a single click

i have created a site through wordpress and i am not able to open menus of my site through single click in the same tab. The only way i can open the menus are by right clicking and selecting open in ...
0
votes
0answers
4 views

How to reference other Site Links in a Wordpress Multisite Menu without typing in whole link?

Basically, would like to reference by Site Id in pretty much the same way posts and pages are referenced by post id in the Menu Links. This, I believe would help immensely when migrating a Multisite ...
1
vote
0answers
15 views

WordPress Menu Prepends URL To My Anchors

I have a menu created in the WordPress menus page. It is made up of anchors created using custom links. For instance, I have a custom URL #claims which is supposed to anchor drop down to the "...
1
vote
1answer
87 views

Change default status and replace the icon for an hamburger menu

When the screen becomes too small (i.e. if I restrict the browser window, or if I open my website from mobile) the menu becomes an hamburger (☰). I want to know how to do the following two things: ...
2
votes
1answer
33 views

How to scroll item in the Menu setting effectively?

My menu list is so long. If I want to move an item to the top of the list, I need to hold and scroll all the way up. This is inefficient and annoying. Is there any way to improve this process?
0
votes
0answers
8 views

Retrieve all menus and items in wordpress

Is it posible with a single REST call to get all the menus and items inside them? I'm just doing it 1 by 1 and that slows the rendering time. Thats what I have for just one menu: function get_menu($...
1
vote
0answers
7 views

Add clickable arrows to parent menu items with children elements e.g. with <em>

I am currently working on a website with a custom theme where the following behaviour should be possible for the mobile version: The navigation can be opened via a hamburger button. Then all parent ...
0
votes
2answers
17 views

How to hide a menu from public, but share content with a private link [closed]

I would like to create a menu or menu item that can only be seen with a private link. So the menu would house various pages, but the content can only be seen with a link that is shared. I have ...
0
votes
0answers
8 views

Hide pages specific user can't edit

I am using roles to allow specific users to edit pages. When a user is logged in and clicks the pages menu they are only allowed to edit those specified by their role. However, all of the pages on the ...
1
vote
0answers
10 views

Show Menu from one WordPress install in another WordPress install

I did some searching but, not finding exactly what I need. I'm redesigning a website that has a main WordPress install and a WordPress install in a subdirectory. My client calls it a nightmare. I'm ...
0
votes
0answers
9 views

change css class of menu item

I try to change the CSS class of a Wordpress menu item By default it gives me: class="menu-item menu-item-type-custom menu-item-object-custom menu-item-4854" But I need this line: class=&...
0
votes
0answers
10 views

Add a Slug to dropdown menu

I've created a multi-region site with the multisite feature on WordPress, and have created a dropdown menu for the multi-site. My question is: is it possible to create a dropdown menu that can add a ...
0
votes
0answers
10 views

Get Navigation Menu name, pages and subpages into a variable

If I have a defined Nav Menu that is named MAIN MENU and within MAIN MENU are the pages: Main Page Sub Page I Sub Page II Sub Page III What is the appropriate terminology used for Main Page and Sub ...
0
votes
1answer
20 views

dynamic php menu with hidden sub-categories only showing when the category name is clicked

This is for a wordpress store and I want to show the categories names automatically, but with the sub-categories hidden, the code below works perfectly with the hover effect, now I wish to have the ...
1
vote
0answers
12 views

I need help adding a second custom menu item to the WooCommerce account area menu

I copied (and customised) the following code which I found online into my functions.php. It has allowed me to add an extra menu item to my WooCommernce account area menu. I now need to add a second ...
0
votes
1answer
27 views

Nav Menu: Theme Location not working

Why do my created Menus on the WordPress Admin dashboard appear in customtemplate.php DESPITE not defining it the correct 'theme_location'? It will show in that location EVEN if the created menu in ...
0
votes
0answers
23 views

Edited one page in my working menu and now all menu buttons don't open unless I right-click and open in new tab

I just recently edited a page on my site and changed the page in my main menu, however now all of my menu buttons don't work unless I right-click and open in a new tab...then the page appears. I have ...
0
votes
0answers
15 views

Remove Link from Wordpress Menu

I am looking to remove the <a> from around a wordpress link and replace it for a <span>. There are lots of articles about how to remove the href="" but this still leaves the <...
0
votes
0answers
13 views

adding pages in underscores.me theme

I have a basic question. I am fairly new to WordPress and I have this task that I am asked to do. I have been asked to add pages (contact, about, portfolio, etc...) to the current WordPress site that ...
0
votes
1answer
47 views

Add custom fields to specific menus

How do I add custom fields to a specific menu? For example, I have menu "Primary" with ID 13. How do I run the wp_nav_menu_item_custom_fields hook only if ID matches the currently selected ...
1
vote
1answer
14 views

How Do I Remove The Right Hand Block On The Main Header?

I want to expand the main header across the full width of the page. Currently, the surrounding colour block around the text box, seems to stretch above the top menu bar on the right, and it looks ...
0
votes
0answers
18 views

Programatically Created Menu not Editable in Dashboard

When my custom theme gets activated, it programatically creates some default pages with custom templates, a nav menu, and several menu items. This saves me a lot of time not having to do those same ...
0
votes
0answers
8 views

How to remove the summary table appearing in my wordpress post

When I create post, there is summary table appearing at the bottom with the page modified info, how to remove it from post. Please help.
0
votes
1answer
11 views

build child and anchestor three from post parent

I'm trying to build a three menu from a custom post type, and wanna build a complet three from the posts children and parents, with all levels both up and down included. And actually the function ...
0
votes
0answers
8 views

Can't add any menu items on live server (no item list)

I can't add any items to menus on live server (can't even see items to add list - there is list of dropdown "titles" like posts, pages, custom post types etc, but when I expand it - list is ...
1
vote
0answers
9 views

Is it possible to change post id for an already added menu item in Wordpress?

In Wordpress is it possible to change a post id of menu item (page) that was already added into a menu? Maybe via some custom function? Our menu is pretty big and i'm searching for an option to save ...
0
votes
0answers
19 views

Is it all right to put the whole <head> tag into template_part file?

I need to have more than one headers so this looks as a good idea but I'm not sure if it is valid. If so, what am I supposed to name a file? I named it head.php so far. Example: <html> <!-- ...
0
votes
0answers
22 views

Toggle Sidebar Menu for Wordpress: How can I get the second click on parent to go to its link?

I created a sidebar toggle menu from this ancestor tree function. I am trying to make it so that when a parent item is clicked, it opens the submenu, and then only when the child menu is already open, ...
0
votes
0answers
10 views

How can I Include Portfolio and Gallery Filters in Main Menu?

How can I include links in my main menu header that filter the portfolio gallery, instead of having a separate section of filters at the bottom? My guess is that it should be a simple addition in the ...
0
votes
0answers
10 views

Drop down menu going behind Hero image on mobile display

my dropdown menu goes behind my Hero image, rather than in front. I managed to fix it on the desktop display using this: #site-navigation ul.sub-menu { z-index: 999; } However, it did not work for ...
0
votes
0answers
34 views

Menu dropdown: dynamically list all posts for category

Situation: I have a wordpress installation where I have two categories: category a category b Now I have several posts which are either category a or b: post 1 -> category a post 2 -> ...
0
votes
0answers
13 views

Include custom menus etc. on custom page (via wp-load)

I'm currently embedding an app on my wordpress website via a custom page (I require wp-load and then use the default template code). Looks like this: <?php require '../../../wp-load.php'; ?> &...
0
votes
1answer
28 views

modify menu item links dynamically

on our wordpress site we use utm_source in the querystring to determine the campaign that brought a customer to our site. I need to dynamically add the passed utm_source from the initial page to all ...
0
votes
1answer
22 views

Is it possible to add a dynamic link in the main navigation in a child theme

My client would like to have a link to the most recent post in the main navigation, but still be able to manage the navigation through the dashboard as usual. I did not find a plugin that will do this ...
0
votes
1answer
24 views

Functions php shortcode for displaying main menu with no child items

I have the following simple functions.php snippet to generate a shortcode which will add a menu to a Wordpress site. I would like to do two new things so that I can use this in a footer. I'm lazy and ...

1
2 3 4 5
62