• Hi,
    Not sure if this issue will replicate for others. This page loads and works as I want it to, with one glitch.

    When I click on one of the links on the home page and then try to click back to the home page with the ‘home’ button in the menu it just takes me to a blank page, not the home page. I have tried looking for help on the template, but I realise I am using an old one, however my client is happy with the template.

    When I inspect the code in a browser it appears that the ‘home’ link is always marked as aria-current, even when I am not on the home page. The odd part is, when I look at the site in customizer it does not come up with this problem, it all loads as it is meant to.

    This is a link to the demo site so it can be seen what should be happening.
    https://demo.lion-coders.com/wp/hello/home/

    Hoping someone can help point me in the right direction.

    Cheers

    • This topic was modified 4 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    The issue is site content is loaded via script, the traditional follow the link scheme is not used. That’s great for essentially static content like most of the site, but the home page itself also loads content by a different script. When a non-home page tries to load the home page, you’re only getting the preload content, not the actual content. The home page’s script loader doesn’t run because the menu’s script loader doesn’t execute scripts on the home page. I hope that makes sense, it’s kind of confusing.

    Something needs to be altered on the menu home link so the script loader does not execute and the conventional follow the link mechanism is used. Determine what selector the menu’s script loader uses, then alter the home page menu item to not utilize that selector’s attribute. Menu content can be altered in PHP through the “wp_nav_menu” filter. This could affect applicable CSS, so after removing the attribute you may need to add appropriate CSS to address the change.

    Thread Starter kel2020

    (@kel2020)

    Hi bcworkz,

    Thanks for your reply and explanation. I have a bit of limited knowledge in changing code etc, but not sure my expertise run to this level. I will have a look around and see what I can find.

    I did finally get a response from the theme creator, but it was less than helpful. I have replied again to hopefully get some more answers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Menu not linking to home pages’ is closed to new replies.