• Resolved drwba

    (@drwba)


    Hi,

    I have set my menu up with headings that I don’t want to be clickable.

    I have used custom links with the link set to #.

    I have then disabled the link in settings so the cursor doesn’t change on hover.

    Everything looks and works perfectly it is just when I test the page on PageSpeed Insights I get a load of ‘Links are not crawlable’ warnings in the SEO section.

    How can I fix this please??

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi drwba,

    The disable link removes the href attribute (which is valid HTML), but it looks like Lighthouse wants it to be there. I can’t see any way around that (I was hoping adding rel=nofollow would work, but it doesn’t), so I think your only option is to reenable the link and use custom CSS to set the cursor back to a pointer. To me, it seems like a bug in Lighthouse, as our output is valid HTML.

    Regards,
    Tom

    Thread Starter drwba

    (@drwba)

    Thanks for the reply Tom.

    Do you know the custom CSS that would work?

    I have tried the following but with no joy…

    @media(min-width: 769px) {
    .mega-menu .sub-menu > li > a[href=”#”] {
    pointer-events: none;
    }
    }

    Plugin Author megamenu

    (@megamenu)

    Hi drwba,

    Try adding this to Mega Menu > Menu Themes > Custom Styling:

    #{$wrap} #{$menu} a.mega-menu-link[href='#'] {
        pointer-events: none;
    }

    Regards,
    Tom

    Thread Starter drwba

    (@drwba)

    Thanks Tom the CSS works but I am still getting ‘Links are not crawlable’ on Lighthouse after reenabling the links.

    This article states that “#” cant be resolved https://developers.google.com/search/docs/crawling-indexing/links-crawlable?visit_id=638115568483592497-740229787&rd=1

    Can you think of a workaround?

    • This reply was modified 1 year, 2 months ago by drwba.
    Plugin Author megamenu

    (@megamenu)

    Hi drwba,

    Could you remove the links/menu items from the menu structure and add them back in as custom HTML widgets in the mega menu builder?

    Otherwise you could use the Replacements functionality in Pro to replace the anchors with spans instead.

    Regards,
    Tom

    I have been having this issue with PageSpeed Insights too. I’ve just come across this thread and have used Replacements (html > Replace the whole menu item link > span ) and that worked.

    Thank you!

    @birdhousedigital can you specify or elaborate your answer “(html > Replace the whole menu item link > span )” please? I am facing same issue and I am not seeing any option for off/remove/replace that achor tag.

    Hope you read this asap and thanks!

    Hi @lguides1
    In Appearances>Menu open the Mega Menu settings for the menu item/heading then to go ‘Replacements’. See screenshot at https://snipboard.io/NkUOAL.jpg

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Links are not crawlable – Google PageSpeed Insights’ is closed to new replies.