Wordpress Navigation Not Working on certain devices

Hi There,

We hare having issues with the iskinaesthetics.co.za navigation on certain devices and we are not sure why, it seems to work on most apple devices but not windows. The links don’t seem to work on certain devices.

Please advise.

Hi @CEGTev,

Thank you for reaching out to us. I checked your site and there is custom JS in the Global JS section which is preventing the one page navigation to work, please remove the custom JS entirely and then make sure to clear all caches (W3 Total Cache and browser’s cache) and see if this works.

If the issue persists then please perform the following troubleshooting steps:

  1. TESTING FOR PLUGIN CONFLICT
  2. THEME UPDATE
  3. CHILD THEME
  4. CSS/JS CUSTOMIZATION
  5. DISABLING CACHE
  6. DISABLING CDN
  7. VERSION COMPATIBILITY

Let us know how this goes!

When you refer to jS the only JS we have inserted is a script for google analytics. is this the issue?

Hello Tevan,

I have tested your site on my desktop and it is also not working. It seems that your custom JS code is preventing the scroll to happen. Can you please temporarily remove this custom JS code?

jQuery(document).ready(function($) {

  var $body                = $('body');
  var bodyHeight           = $body.outerHeight();
  var adminbarHeight       = $('#wpadminbar').outerHeight();
  var navbarFixedTopHeight = $('.x-navbar').outerHeight();
  var locHref              = location.href;
  var locHashIndex         = locHref.indexOf('#');
  var locHash              = locHref.substr(locHashIndex);
  var dragging             = false;
  
  $body.on('touchmove', function() {
      dragging = true;
  } );
  
  $body.on('touchstart', function() {
      dragging = false;
  } );


  //
  // Calculate the offset height for various elements and remove it from
  // the element's top offset so that fixed elements don't cover it up.
  //

  function animateOffset( element, ms, easing ) {
    $('html, body').animate({
      scrollTop: $(element).offset().top - adminbarHeight - navbarFixedTopHeight + 1
    }, ms, easing);
	return false;
  }


  //
  // Page load offset (if necessary).
  //

  $(window).load(function() {
    if ( locHashIndex !== -1 && $(locHash).length ) {
      animateOffset(locHash, 1, 'linear');
    }
  });


  //
  // Scroll trigger.
  //

  $('a[href*="#"]').off('touchend click').on('touchend click', function(e) {
    href        = $(this).attr('href');
    notComments = href.indexOf('#comments') === -1;
    if ( href !== '#' && notComments ) {
      var theId = href.split('#').pop();
      var $el   = $('#' + theId);
      if ( $el.length > 0 ) {
        e.preventDefault();
        
        if (dragging) {
            return;
        }
        
        animateOffset($el, 850, 'xEaseInOutExpo');
		if(!$('.x-nav-wrap-mobile').hasClass('.x-collapsed')) {
			$('.x-btn-navbar').click();
		}
		return false;
      }
    }
  });
});

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi there, i cannot seem to find the script that need to be removed, please help i am adding the required in a secure note.

Hello tevan,

I have updated both the X theme and Cornerstone to the most recent release version. I temporarily deactivated the W3 Total Cache plugin. When I tested your site again, the navigation seems to have been working again. I am guessing that the issue might just be a caching issue. Does the issue happen right after you have updated? If that is the case, always remember to clear all caches (like if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

And please clear your browser cache too. You may use private browsing mode in testing your site to make sure that you are viewing the latest codes from the updates and not the cached version in your browser.

After your test, you can reactivate the W3 Total Cache plugin if you no longer find any issues on your site.

Please test your site now.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.