Articles of menus

Dynamically add sub-categories to any category in the menu

I have a menu with a combination of pages and categories. I need to loop through the menu and if it finds a category automatically add all child-categories as a submenu. Page 1 | Page 2 | Custom Link Category 1 Category 2 Child Category In the example above I need to dynamically add the […]

How to add Plugin functionality in WordPress Frontend Menus

In Plugin, I have made Custom Category for Products. Its Simply CRUD for Category and Category Wise Products. So now i want to add these Categories in WordPress Frontend Menus. So it can be used for frontend. So how can i do this? Thanks in adv.

Creating menu always gives error A name is required for this term

I have 2 menus. Main Navigation Footer Navigation And 3 locations: Top Bar Navigation Main Navigation Footer Navigation If I try to create a new menu, wp displays error A name is required for this term. Obviously I am giving a name in Menu Name textbox… Is this a bug? Is there a limit to […]

How to include a third level with wp_get_nav_menu_items function

I’m trying to create a custom menu structure that will work with jquery push menu’s. http://multi-level-push-menu.make.rs/ All is working fine with the 1st and 2nd level. If I try to add a third level to my menu, everthing goes weird. Obvoiusly this is due to the function only accounting for a second level. But unfortunately […]

How to automatically redirect to first item of second navigation level in a multi-level menu?

I have a use case where my WP install is a bunch of pages with sub-pages. For example: HOME ABOUT – ABOUT US – HISTORY – PEOPLE – AWARDS PRODUCTS – PRODUCTS – INGREDIENTS – PROCESS I would like to establish a structure where clicking on the 1st level navigation item (“About”) takes you to […]

How to get the name of the homepage's menu?

I am trying to add a menu item programmatically through a plugin to a menu based on location and i want this to be added to the location that is attached to the homepage’s menu. This is my code: //Add user menu item add_filter( ‘wp_nav_menu_items’, ‘add_user_link’, 10, 2); /** * Add a login link to […]

(Solved) How to add a submenu toggle button inside all “li” elements that have a submenu?

I’m building a mobile navigation menu. I wan’t the menu to work like this: In this image you see a mobile nav with multiple depth levels. This is how I wan’t the code structure to look like: <ul> <li></li> <li class=”menu-item-has-children”> <div class=”toggle-button”></div> <a href=””></a> <ul class=”submenu”> <li></li> <li class=”menu-item-has-children”> <div class=”toggle-button”></div> <a href=””></a> <ul […]

The cart, checkout, and shop links not getting removed

I uninstalled woocommerce plugin but yet the shop, checkout and cart links in navigation bar is persistent. The theme I’m using is Compass. But whatever theme I choose those three links do not vanish. I want to create a simple blogging website for myself. Any suggestion is welcomed.

Disable parent in wp_list_pages – WordPress

I have the following code the generates the sitemap. wp_list_pages( array( ‘exclude’ => ‘5’, ‘sort_column’ => ‘ID’, ‘title_li’ => ” ) ); It generates a hierarchy of my Pages but it also has links to my parent pages. check the screenshot above. I only need the title for all the parents not the link. Please […]

How to remove the Navigation Bar (prim. and sec.) from the Homepage for the Genesis Framework?

How to remove the Navigation Bar (prim. and sec.) from the Homepage for the Genesis Framework?