Support » Plugin: Autoptimize » Lost Nav bar

  • Resolved mattyboyzhere

    (@mattyboyzhere)


    Unfortunately when using Bakery Autoptimize has removed my Nav bar, could someone please help me get it back without having to turn off certain features?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    The navbar seems still to be lost when AO is disabled (by adding ?ao_noptimize=1 to the URL Matty.

    The reason is you have inline CSS that is hiding the menu;

    .main-header, .menu-wrapper, footer {
        display: none  !important;
    }

    Remove that and you’ll be fine 🙂

    Hope this helps,
    frank

    Hi frank, I have purposely removed the header on my main page, however it has removed it from every-other page (This CSS is on the Main-page only) If you go in to Design & Manufacture or Animation & Graphics the Nav bar is still missing! Thanks though.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so the problem is that your theme has inline JS that depends on linked JS which when AO is running in default config is not available yet.

    possible solutions;
    * tick the “also aggregate inline JS” option; this might lead to cache size issues, so not recommended
    * add wp-content/themes/uncode/library/js/init.js (or even wp-content/themes/uncode/) to the comma-separated JS optimization exclusion list

    hope this helps,
    frank

    Thanks you! worked a charm – For future reference how do I find out what the conflict is & what js to block?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    always happy when someone wants to learn how to fish! 🙂

    so the browser console had something like UNCODE is not defined or so, so I checked page source and saw the inline JS that called UNCODE.xzy methods which upon inspection were added by that specific JS-file (which I saw by viewing the same page with ?ao_noptimize=1 added to the URL to disable AO for that request). so to avoid those functions not working, the order of JS-file first and inline JS second needs to be restored, which is what both solutions do 🙂

    frank

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lost Nav bar’ is closed to new replies.