Main navigation bar not working

I had a developer do some work on the page at the URL in the secure notes. However, I now find my main navigation bar will not work. He added a plugin called Custom CSS and all the changes he made are located in there. Is it possible for you to have a look and tell me what he has done to cause the navigation bar to stop working.

Hi @waynepatt58,

I got the following errors:


VM43:1 Uncaught ReferenceError: points is not defined
    at eval (eval at <anonymous> (map.js?ver=5.2.2:1), <anonymous>:1:110688)
    at eval (eval at <anonymous> (map.js?ver=5.2.2:1), <anonymous>:1:156051)
    at map.js?ver=5.2.2:1
VM27:881 Uncaught TypeError: FlaShopUSAMap is not a constructor
    at HTMLDocument.<anonymous> (VM27:881)
    at i (jquery.js?ver=1.12.4-wp:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
    at Function.ready (jquery.js?ver=1.12.4-wp:2)

It is coming from your MAP plugin. Please try to disable it and try again.

Thanks for checking that out. I disabled the Map Plugin and cleared my cache but the problem still exists. In fact the header carousel is also not showing on different pages, see pic below;

I should also mention that this is a staging site, could that be causing it?

Hey @waynepatt58,

Thank you for reaching out to us. I tried to login but I’m getting an error on the admin screen, If you’ve a custom admin panel URL then please provide that so we can take a closer look at your setup. However I checked your pages and you’ve a custom JS script which is triggering an error. Please find and remove the following script:

jQuery(document).ready(function () {

    var sidebarTop = jQuery("body.page-id-17275 aside.x-sidebar.right").offset().top;

    var topPosition = jQuery("body.page-id-17275 .x-main.left > article").offset().top;

    // jQuery("body.page-id-17275 aside.x-sidebar.right").css("top", topPosition + "px");

    // jQuery("body.page-id-17275 aside.x-sidebar.right").css("left", jQuery("body.page-id-17275 aside.x-sidebar.right").offset().left + "px");

    jQuery("body.page-id-17275 aside.x-sidebar.right").css("width", jQuery("body.page-id-17275 aside.x-sidebar.right").outerWidth() + "px");

    jQuery(window).scroll(function() {
        var scrollingTop = jQuery(window).scrollTop() + 50;

        if(scrollingTop > topPosition) {

            

            jQuery("body.page-id-17275 aside.x-sidebar.right").addClass("sliding");

            

            


        }
        else if(scrollingTop < sidebarTop) {
            jQuery("body.page-id-17275 aside.x-sidebar.right").removeClass("sliding");
        }
    });



    jQuery(document).on("scroll", onScroll);
    
    //smoothscroll
    jQuery('body.page-id-17275 aside.x-sidebar.right div#custom_html-2 ul li a[href^="#"]').on('click', function (e) {
        e.preventDefault();
        jQuery(document).off("scroll");
        
        jQuery('body.page-id-17275 aside.x-sidebar.right div#custom_html-2 ul li a').each(function () {
            jQuery(this).removeClass('active');
        })
        jQuery(this).addClass('active');
      
        var target = this.hash,
            menu = target;
        $target = jQuery(target);
        jQuery('html, body').stop().animate({
            'scrollTop': $target.offset().top+2
        }, 500, 'swing', function () {
            window.location.hash = target;
            jQuery(document).on("scroll", onScroll);
        });
    });
});

function onScroll(event){
    var scrollPos = jQuery(document).scrollTop();
    jQuery('body.page-id-17275 aside.x-sidebar.right div#custom_html-2 ul li a').each(function () {
        var currLink = jQuery(this);
        var refElement = jQuery(currLink.attr("href"));
        if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
            jQuery('body.page-id-17275 aside.x-sidebar.right div#custom_html-2 ul li a').removeClass("active");
            currLink.addClass("active");
        }
        else{
            currLink.removeClass("active");
        }
    });
}

I believe it’s added in the plugin that your developer added, if you’re unable to find the above script then try disabling the plugin and see if this resolves the issue.

If the issue remains then please check for the following:

  1. Ensure everything is up to date according to our version compatibility list at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195. Please follow the best practices when updating your theme and plugins. See https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 for more details.

  2. Clear all caches including browser cache then deactivate your caching plugin and other optimization plugins. If you’re using a CDN, please clear the CDN’s cache and disable optimization services.

  3. Try deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  4. Remove custom CSS, JavaScript and deactivate your child theme and switch to parent theme (take a complete backup first).

Let us know how this goes!

Thanks very much, I will contact the developer and see if he can fix the issue.

You’re welcome. Glad we could lead you to the right direction.

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