Parent category not clickable in menu with child categories

  • Home
  • Forums
  • Dokan
  • Parent category not clickable in menu with child categories
This topic contains 8 reply and 2 voices, and was last updated by Tareq Hasan 9 years, 11 months ago
Viewing 8 Posts - 1 through 8 (of 8 total)
Author Posts
April 27, 2014 at 7:46 pm 19485
Tareq Hasan Is there a way to make the parent categories able to link to their page in the menu if there are child categories under them? Update: all menu items, except for the last sub menu are unclickable. For instance, if you have Clothing > Tops > Short-Sleeves -- then only short-sleeves can be clicked on.
April 28, 2014 at 9:06 pm 19541
Simon Simon

Looks like this is due to the use of WP Bootstrap Navwalker. See comments in this thread: http://stackoverflow.com/questions/22127975/bootstrap-menu-integration-in-wordpress-with-nav-walker-hover

April 28, 2014 at 9:13 pm 19542
Simon Simon

So can we remove the nav walker from the main menu and use the same function that is in the product category menu instead? It’s fine for the top nav menu (Cart, Seller Dashboard, My Account), but not for the main menu.

May 1, 2014 at 9:04 pm 19776
Simon Simon

Hi, is this something that will be looked into?

May 6, 2014 at 11:41 pm 20008
Simon Simon

Hi can this be looked in to?

May 8, 2014 at 3:30 am 20111
Simon Simon

Bumping again since I haven’t gotten a response.

May 8, 2014 at 7:52 pm 20150
Tareq Hasan Tareq Hasan

Hello Simon,

Sorry for the long delay. It was a complicated solution, so I beg your pardon. Please try the following jQuery solution:

[js]
$(‘#cat-drop-stack li.has-children’).on(‘click’, ‘a’, function(e) {

var self = $(this),
parent = self.parent(),
tagName = parent.prop(‘tagName’),
className = parent.attr(‘class’);

if ( className === ‘has-children’ ) {

e.preventDefault();

} else if ( tagName === ‘H3’ ) {

if ( parent.siblings().length ) {
e.preventDefault();
}

}
});
[/js]

May 8, 2014 at 8:07 pm 20152
Simon Simon

Hi Tareq, thanks for the response, but the menu I am talking about has a class of navbar-nav, not an ID of cat-drop-stack.

The only item that can be clicked on in this menu is eCommerce. I want all levels to be clickable to their pages.

The only items that can be clicked on are Bootstrap and Foundation. I want Mobile First Framework to also be clickable to its page.

May 9, 2014 at 12:02 am 20171
Tareq Hasan Tareq Hasan

Sorry, seems like we misunderstood this issue. While building Dokan I never created any more level menus, so I overlooked this. I’ll fix it in the next update.

Viewing 8 Posts - 1 through 8 (of 8 total)