Home Forums Theme Support Dokan Parent category not clickable in menu with child categories

This topic is: resolved

This topic contains 8 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #19485

    Simon
    Member
    Post count: 58

    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.

    #19541

    Simon
    Member
    Post count: 58

    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

    #19542

    Simon
    Member
    Post count: 58

    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.

    #19776

    Simon
    Member
    Post count: 58

    Hi, is this something that will be looked into?

    #20008

    Simon
    Member
    Post count: 58

    Hi can this be looked in to?

    #20111

    Simon
    Member
    Post count: 58

    Bumping again since I haven't gotten a response.

    #20150

    Tareq Hasan
    Keymaster
    Post count: 2831

    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]

    #20152

    Simon
    Member
    Post count: 58

    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.

    #20171

    Tareq Hasan
    Keymaster
    Post count: 2831

    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 9 posts - 1 through 9 (of 9 total)

The topic ‘Parent category not clickable in menu with child categories’ is closed to new replies.