Anchor not working

Hi,

On my homepage, I have an anchor. But when I type the link, it first shows the right element and then goes back up to the previous section…

Here’s the link : https://www.mendo.ch/fr/#mendonewsletter

It should go to :

But keeps showing :

Any idea how to fix this ?

Thanks

Hi @baysquentin,

Thank you for writing in, try applying your ID to the Section instead of the text.

If the issue persists, please do testing for a plugin conflict. You can do this by 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. If you have custom JS try removing those as well.

Let us know how it goes,
Cheers!

Hi, thanks.

I applied the ID to the section, to the column, to the element. Always the same result.
I also deactivated all plugins. Still the same result…

Any other idea ?

Hi @baysquentin,

Did you remove the section with mendonewsletter ID? I don’t see any section (or any element) with that ID. I see you have a child theme do you have a customization or script that has something to do with one-page navigation scrolling? Would you mind removing those customizations or script and see if that resolves the issue.

Another thing, I see you have W3 Total Cache and Autoptimize plugin, would you mind CLEARING the cache of those plugins and deactivate it for a while? The JS on your site are minified by Autoptimize and that can be problematic.

Thanks,

Hi,

Yes, the ID was removed. It is back in the section.
I have no customization nor script in the child theme.
I cleared all caches and deactivated W3 and Autoptimize, but still the same result…

Hello @baysquentin,

To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Regards.

Hello @baysquentin,

Thanks for writing in! I have inspected the page and the issue appears because of the fullwidth classic slider that you have added on the page. As soon as the page load, it scrolls to the mendonewsletter section. Unfortunate, the slider images were not fully loaded yet so as soon as all those images were loaded, the height changes which is the reason why the section moves up in the display. You can test and confirm this by removing the classic slider element and you’ll see what I mean.

To better resolve this without editing or any custom JS/CSS, I would recommend that you install a 3rd party Page Loader plugin. The plugin will display a page loader and will only reveal the page once all the element including the images is loaded thus should display the correct mendonewsletter section. Perhaps any of these plugins may help you:

Best Regards.

Ok, thanks !
Best regards.

You’re most welcome!

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