• Resolved Miss

    (@dorabet)


    these Last few days, i tried to use AMP plugin for my site
    but still cant find the solution for the link on the menu
    at first i thought its one of the plugin fast velocity minify, so i disable it = no luck
    i even disable all the plugin = no luck

    im not a tech savy so i really need some help here

    Thanks a lot

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thanks for reaching out. From looking at your site it looks like your navigation menu dropdown is JavaScript based. With custom JavaScript is restricted to amp-script and other components it’s expected that it won’t work in AMP by default if the theme developer hasn’t provided any fallback.

    While you can reach out to your theme developer and ensure about AMP support you can also use the AMP plugins reader mode, allowing you to select a different AMP compatible theme for your AMP URLs, with your non AMP URLs not impacted.

    If making a suggestion to your theme developer regarding AMP compatible you may also find the Toggling Hamburger Menus documentation page useful.

    If you want to also share the theme you’re using I can check and see if it’s something we can inspect from our side.

    Thread Starter Miss

    (@dorabet)

    Hi James thanks for the reply
    since im not familiar with amp so i ve read about hamburger menu from other site
    https://code.tutsplus.com/tutorials/code-a-burger-menu-for-mobile-users-in-wordpress–cms-33176

    jQuery(document).ready(function() {
    jQuery(‘.toggle-nav’).click(function(e) {
    jQuery(‘.menu.main ul’).slideToggle(500);

    e.preventDefault();
    });

    });

    so it will not work too with amp if with js right ?

    and yes i dont mind to share the theme, how can i send it to you ?

    so it will not work too with amp if with js right ?

    Correct, that snippet above won’t work.

    and yes i dont mind to share the theme, how can i send it to you ?

    Providing the theme is available on the WordPress theme repository or publicly available elsewhere feel free to share the link. We can then check the theme and see if we can apply a fix.

    Thread Starter Miss

    (@dorabet)

    Hi
    my mistake, i thought i can send the theme to you
    to share my theme to public im afraid not possible at the moment

    I understand. In that case please download, install and activate the AMP Generic Compatibility plugin before navigating to “AMP Compatibility -> JS -> Enable JS“. From there paste the below code:

    const navigationChange = () => {
        const button = document.getElementById('responsive-menu');
        button.addEventListener('change', (e) => {
          const select = e.target;
          const value = select.value;
          const theURL = select.options[select.selectedIndex].value;
          var theLink = document.querySelectorAll('[href*="'+theURL+'"]');
          theLink[0].click();
        });
    }
    navigationChange();

    Please then save before checking your AMP URLs once more. Let me know how you get on after testing that.

    Thread Starter Miss

    (@dorabet)

    Hello again James
    after i install AMP Generic Compatibility plugin still no luck ??

    i dont think i can fix this myself James
    after you look at our site, the structure etc, is it possible for us to hire freelancer to fix this ?

    or this theme cant be fix ?

    Thanks James

    Plugin Support Milind More

    (@milindmore22)

    Hello @dorabet

    Thanks for testing the code, I will recommend switching to Reader Mode and choosing an AMP Compatible theme (You can default WordPress themes or themes like Astra or Neve) for AMP pages. It will be a cost-effective way to tackle all incompatibilities from the theme.

    Alternatively, you can look for professional help, we recommend checking out some of the AMP Experts from our site.

    Thread Starter Miss

    (@dorabet)

    Hi Milind

    thanks for your suggestion to use the reader mode and change theme
    and about your amp expert, i ll look into it

    Thanks again, very nice support from both of you

    Not a problem, happy to help. If you have any further reader mode questions going forward be sure to reach out by opening a support topic.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Menu Link Not Working’ is closed to new replies.