• Hi and thanks for any advice

    In my Nav bar menu the subpages can be navigated to but trying to click on the parent pages does not take me to parent page which has content (or will do).

    How can I make the parent pages navigable from the menu as as soon as subpages are listed it appears to become impossible?

    Here is the site

    https://www.medicaldoorway.com/

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • hi,

    create a child theme first and after it create menu.js file into child theme directory now copy the below code and paste into menu.js file

    jQuery(document).ready(function() {
    		var bMobile;  // true if in mobile mode
    		var isMobile;
    		// Initiate event handlers
    		function init() {
    			var isMobile = {
    				Android: function() {
    					return navigator.userAgent.match(/Android/i);
    				},
    				BlackBerry: function() {
    					return navigator.userAgent.match(/BlackBerry/i);
    				},
    				iOS: function() {
    					return navigator.userAgent.match(/iPhone|iPad|iPod/i);
    				},
    				Opera: function() {
    					return navigator.userAgent.match(/Opera Mini/i);
    				},
    				Windows: function() {
    					return navigator.userAgent.match(/IEMobile/i);
    				},
    				any: function() {
    					return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    				}
    			};
    
    			var oMenus = jQuery('.navbar-nav  .dropdown'),nTimer;
    			if( isMobile.any() ) {
    				// Set up menu on click for Mobile and ipad mode
    				oMenus.on({
    				  'mouseenter touchstart': function(event) {
    					event.preventDefault();
    					clearTimeout(nTimer);
    					oMenus.removeClass('open');
    					jQuery(this).addClass('open').slideDown();
    				  },});
    				jQuery('ul.dropdown-menu li a').on('click touchend', function() {
    					var link = jQuery(this).attr('href');
    					window.open(link,'_self'); // opens in new window as requested
    					return false; // prevent anchor click
    				});
    			} else {
    				oMenus.on({'mouseenter touchstart': function(event) {
    					event.preventDefault();
    					clearTimeout(nTimer);
    					oMenus.removeClass('open');
    					jQuery(this).addClass('open').slideDown();
    					},
    					'mouseleave': function() {
    					nTimer = setTimeout(function() {
    					oMenus.removeClass('open');
    					}, 500);
    					}
    				});
    			}
    		}
    		jQuery(document).ready(function() {
    		  // Your other code to run on DOM ready...
    			jQuery(".nav .dropdown-toggle").click(function () {
    			window.location = jQuery(this).attr('href');
    			});
    		  init();
    		});
    		jQuery(window).resize(init);
    	});

    save the changes.
    Thanks

    same issue here.. tried your solution..
    didnt do anything
    but if i go into parent theme and replace file it seems to eliminate the hover function but still no navigation to parent pages

    Thread Starter LostInStaffordshire

    (@lostinstaffordshire)

    I contacted Weblizar directly and got this fix

    If you want to your site parent menu working. Yes It is possible. But you need to edit some line of code.

    Go to theme directory =>core => menu => open the weblizar_nav_walker.php file and find the below given line of code.

    $attributes .= ($args->has_children) ? ‘ data-toggle=”dropdown” data-target=”#” class=”dropdown-toggle”‘ : ”;

    >Replace by

    // $attributes .= ($args->has_children) ? ‘ data-toggle=”dropdown” data-target=”#” class=”dropdown-toggle”‘ : ”;

    Save the changes.

    I haven’t done this yet as have more pressing work. Let me know if this wors for you.

    Hi DarthVaper,

    Did the above solution work for you.

    Thanks

    Hi Weblizar_support,

    I had the same problem. I tried your solution and it works.

    However it works only when you make the adjustments in the file in the enigma template, when you create a child theme and create the same structure as the parent template and then place the file with adjustments in the child-theme it doesn’t work.

    So now I will lose the adjustment if enigma gets update and I have to put it in again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Parent pages not navigatable in the Nav Menu’ is closed to new replies.