All Questions
Tagged with page-menus or menus
3,219 questions
0
votes
0
answers
11
views
Post Navigation Elementor
I'm using Elementor and ACF on a website and have a custom post type for events. In elementor I have the posts on the archive page set to order by the ACF start date field. When the user clicks the ...
0
votes
1
answer
1k
views
menu mobile show up even i in desktop mode in Newspaper Theme
I have WordPress website with Newspaper Theme and I have a problem with the Menu.
Link: demo2.tmanow.net
I have 2 problems:
The menu mobile show up in left side even i in desktop mode, this
not ...
1
vote
1
answer
4k
views
How to add class to parent a tag with a sub menu
I have been trying to add a class to the parent a tag of a sub menu using a custom walker. The current walker I am using adds the class to the parent <li>, does anybody know how to adjust this ...
1
vote
1
answer
7k
views
How to add widget in main menu
I want to display widgets in main menu. There are few plugins to do this and i already used in my previous projects. But now i want do without any plugin. I can create a custom sidebar and call this ...
1
vote
1
answer
959
views
How to use buttons elements for tgetWordPress menu items?
How do I mix HTML element types for a two-menu navbar?
I am building a WordPress theme with Bootstrap 4.
WordPress' menu contents should be sourced from the Menus options, output in to a Bootstrap 4 ...
1
vote
1
answer
2k
views
How to set the currently active page in the menu including parents
I have the following problem:
There is a custom post type. There are several pages each listing some of the posts based on some post criteria (custom WP_Query).
When I click on a link to open the ...
0
votes
1
answer
1k
views
WordPress Dashboard add user password not working, etc
I need help with my WordPress Dashboard. I think this happened when my site crashed and was forced to disable the plugins by renaming the plugins folder.
I am unable to toggle the "Add User Show ...
1
vote
1
answer
832
views
Change submenu markup
I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own.
The problem with this is that I would like to change the markup of the submenu and ...
0
votes
1
answer
1k
views
List all posts from custom post type by taxonomy
Having custom post types with taxonomies.
Lets say I have a custom post type "Products" with taxonomies "new", "old", "fashion".
Now I have a Nav where I can click on wordpress.private/products/new/...
1
vote
2
answers
1k
views
I want to hide the navigation menu on a particular page
I want to hide the navigation menu on a particular page. I know how to find the page id, but I am clueless about how to find the rest of the stuff, it would be great if someone could look into my blog'...
1
vote
1
answer
870
views
Custom Class to wp nav menu
I am trying to edit the default arguments in the wp_nav_menu function.
Basically I need to add a custom class to the UL and a custom class to the LI.
I have tried to use
<?php
function ...
1
vote
2
answers
47
views
How do I have WordPress use the <menu> tag for generated menus?
As the formal enclosure for menu items is the <menu> tag how to I make WordPress use the <menu> tag as a wrapper around menu items instead of the more generic <ul> ?
EDIT: I believe ...
2
votes
1
answer
1k
views
Create Dropdown menu Using wp_nav_menu() function
Kindly provide me wp_nav_menu structure to create the following dropdown menu.
<div class="container">
<div class="nav-menu">
<a class="toggleMenu" href="#">Menu</a>
<ul ...
0
votes
1
answer
3k
views
How to use Bootstrap Navbar in wordpress Nav Menu
Here is my code.
<?php wp_nav_menu(array('theme_location => 'primary',)); ?>
How to format the code in my header.php using the bootstrap navbar? I am using bootstrap 4.3x. I am new to ...
0
votes
2
answers
2k
views
Need help with adding custom wordpress menu and sub-menu
I've got my HTML Custom Nav set up and it works fine for static template. I want to convert it into wordpress navigation menu. I am totally new to wordpress and i want help to convert html menu to ...
0
votes
1
answer
1k
views
How to retrieve a Menu Name by Menu Location with ACF fields
What WordPress function can be used to retrieve a Menu Name using the Menu Location as parameter?
0
votes
1
answer
1k
views
Adding widget to sidebar which contains current page's submenu
Need to insert the sub menu of the current page into the current page's sidebar.
Is this possible?
What I'm interested in developing would be a menu that looks like this:
menuItem1 => subitem1, ...
1
vote
1
answer
2k
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 ...
1
vote
2
answers
2k
views
Hide product categories and taxonomy terms in menu if empty
I've been researching this and had no luck so far.
I have a WooCommerce store with a main menu showing product categories (product_cat) and brands (yith_product_brand) which is a custom taxonomy.
I ...
0
votes
1
answer
719
views
Mobile Menu Not Working
The mobile menu stopped working after I updated WP to the latest version, I assume it has to do with a customization of the theme.
http://kvintage.com/
Wondering if anyone could please take a quick ...
0
votes
2
answers
4k
views
Menus not visible in Appearance after being registered
The menus have been registered in functions.php, but they don't appear within the Appearance > Menus section in Admin and the pages, posts etc options are greyed out.
The menus are saved, as you can ...
0
votes
3
answers
1k
views
Get menu items problem
I'm trying to get a menu items created from wordpress admin panel.
To do this I followed the instructions codex:
http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items
// Get the nav ...
0
votes
2
answers
2k
views
Menu Button that link to different pages for unique user?
Is there a way to create an menu button that link to different pages to each unique user?
So far I have used the plugs-in: User Specific Content, Peter's Login Redirect and Them my Login.
Basically, ...
0
votes
1
answer
1k
views
Give custom class names to WP nav sub-menu
I'm creating a menu that will have sub-menu > sub-menu > sub-menu. The styling is really involved so ideally I could rename the class name "sub-menu" based off what level of sub-menu ...
0
votes
1
answer
1k
views
Add newsletter signup element to navigation bar
I've been researching here and on other dev/WP sites to find the best solution for adding what is effectively a custom element to the navigation menu, and it seems like there are many approaches. ...
2
votes
1
answer
1k
views
Adding an admin menu page showing the link twice - how to solve this? [closed]
I'm newbie and I'm trying to create a plugin to add a menu to left menu in admin section.
i have create the page but it is working fine. but i find the left menu being displayed twice. how can I ...
1
vote
2
answers
4k
views
list category posts under its item in menu
When adding category to Menu, I need it to list all the item that belong to that category in separate UL automatically. like this
https://i.sstatic.net/ulOOS.jpg
Of course I can do that manually, but ...
2
votes
1
answer
1k
views
Remove nav menu item by script
I want to create my custom nav menu using a script in a wp plugin.
I'm almost there using this tutorial. All I need is the option to delete menu entries.
something like wp_delete_nav_menu_item($...
0
votes
2
answers
1k
views
Add a data attribute to list item element in menu
Looking to add a data attribute to a list item in a menu, I can see that some threads on here can add it to the actual <a> link tag, I am looking to add it to the list item itself <li>
So ...
0
votes
1
answer
763
views
menu not showing on mobile view
I am using the latest version of wordpress with the festy.beautheme theme. The drop down menu doesnt show on mobile - or when the browser window is very small. Its the drop down menu that is three ...
-1
votes
1
answer
4k
views
How to validate password length in wordpress
How to make password length validation in the below code as i am new to php
I want user to set atleast 8 character length password.
Pass1 is the id of password.I tried to use below code but its not ...
0
votes
3
answers
4k
views
how do you create this customize menu using wp_nav_menu function?
how do you create this customize menu using wp_nav_menu function?
function.php file
register_nav_menus( array(
'header-menu' => 'Header Menu',
'footer-menu' => 'Footer Menu'
) );
...
0
votes
1
answer
2k
views
Add parent menu item in sub-menu in custom nav_walker
Currently I'm working on a project where we need to append the parent title as first item in the submenu for a mobile menu.
What I try to achieve is this:
<ul class="menu">
<li>
...
1
vote
1
answer
2k
views
Dynamically add sub menu items
I have been able to add menu items with this statement, this however creates a flat menu. The menu has been created already. I just need to add items.
wp_update_nav_menu_item(4, 0, array('menu-...
0
votes
2
answers
1k
views
Unable to edit Navigation bar
I should first mention I am fairly new to wordpress and web development.
I was given the task to update an existing site which includes the navigation bar. I have been digging through code trying to ...
1
vote
2
answers
2k
views
wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'container' => 'ul',
'menu_class'=> 'top-menu'
...
1
vote
1
answer
1k
views
current-menu-item class in CSS
I have created one main Page(Home Page) and many custom links in wp-admin. All custom links are linked to sections of Home Page.
Example: Custom link About Us has a URL = #section1 and in my code I ...
1
vote
2
answers
2k
views
How to wrap the list with custom class using wp_nav_menu?
I want to display 4 column footer menu. but when I add new menu the wp_nav_menu create a < li > and add every menu items to it.
now, how can I wrap every li element with a custom div tag with a ...
0
votes
1
answer
908
views
How to separate sub-menu output and keep associated with parent
I am creating a menu like this https://squareup.com/ I have the html,css, and jquery ready. Now, I am trying to:
Create the menu items with it's sub-menu items via wp-admin -> appearance -> ...
24
votes
4
answers
39k
views
Add 'has_children' class to parent li when modifying Walker_Nav_Menu
I'm writing a customised walker class for wp_nav_menu and want to be able to specify if an li contains a submenu. So I want my markup to be:
<li class="has_children [other-wordpress-classes]">
...
0
votes
1
answer
1k
views
Creating custom vertical menu
First of all sorry me for my bad English but isn’t my native language so I’ll do as best as possible to explain my problem.
I want to create a custom menu with Walker_Nav_Menu that should look like ...
0
votes
2
answers
2k
views
Sub Categories in drop down menu
I have lot of categories and sub categories. I want to add all these in WordPress menu. But i want to add subcategories aligned properly under their parent categories without drag and drop each and ...
0
votes
1
answer
1k
views
How to change navwalker's dropdown mark-up?
I am using this Bootstrap 4 Navwalker, bs4navwalker, to step through my WordPress menu items and generate a navbar, like...
Single level - works
<?php
wp_nav_menu([
'menu' ...
1
vote
2
answers
1k
views
wp_list_categories in in nav_menu
I have a website and I want to add automatically categories to my menu. I mean when I create new category it should appear in my menu. How I can make it?
<?php wp_nav_menu( array( '...
3
votes
1
answer
776
views
How do I approach removing menu items on the fly based on settings in my plugin?
I've started writing a plugin that allows the administrator to select specific pages and set them to be visible only to logged-in users; the plugin optionally applies the restriction to all child ...
1
vote
2
answers
1k
views
add_action does not call the function
I want to add a custom field in the menu, therefore I am trying to use wp_nav_menu_item_custom_fields. I am using following code but it does not even call the function. I am adding it in a plugin, why ...
-1
votes
1
answer
1k
views
Wordpress site hamburger menu toggle not working
When I shrink down the browser to test for mobile responsiveness, the hamburger menu does not open, even after I clicked on it. I have tried everything from troubleshooting my plugins to searching all ...
2
votes
1
answer
2k
views
Programmatically set current-menu-item using wp_nav_menu
I'm calling wp_nav_menu programmatically on a class and I'd like to be able to set the field that will be shown as the current-menu-item but I don't see an argument for that.
It seems like I may be ...
0
votes
1
answer
2k
views
Custom menu with categories and tags
Basically I need a custom menu consisting of two level.
Top level will consist of available categories, possibly with added feature that each category name is follow by the number of posts in that ...
0
votes
0
answers
22
views
How can I keep a WordPress dropdown menu open when navigating to a child page?
I'm using WordPress with the Astra theme (free version), along with Elementor Header & Footer Builder (free version) and the WP Mobile Menu (free version). I've set up a dropdown menu, but it ...