Anchor links not working without scroll first v2 (Advanced Ads issue)

This is a follow up to my older post Anchor links not working without scroll first.
I have now redone the page to remove my use of IDs to style with CSS.
However, there is still the issue where anchor links don’t work correctly when you first load the page (and don’t scroll). It is the same on every page, including our homepage https://innovatek.co.nz.

Hi @Innovatek,

I have checked your website and found the links are working from the first time and without reloading it. If you are still having this issue, please mention the device, browser name and version, and also the operating system you are using, that helps us to replicate the issue at our end.
Also, any screen-captured video will help us to understand the steps you follow.

Thanks

I found the issue. It is caused by the plugin ‘Advanced Ads – Sticky Ads’.
It’s strange because it happens on all pages with internal anchor links, not just the couple of pages I am using this plugin (via shortcode). Disabling this plugin fixes the problem. This is one of the extensions for ‘Advanced Ads’. The other extensions work fine.

In short, it is an issue with that plugin and/or the plugin’s integration with Theme X pro and Cornerstone and/or how the Javscript works.

I will follow up with the plugin developer to see if they know what is causing the issue with their plugin.

Here is a recording to show what happens. https://drive.google.com/file/d/1C6x7PP610qXdfOY_cwReFnb06IKomkHn/view?usp=sharing
In the video, you can see the anchor link goes to the right place, but then scrolls back up. I reloaded the page and did it with another internal link with the same result. I then reloaded again and scrolled down one line before using the link - and it worked correctly.
Please note, I also removed the section that it re-scrolls to, but it just scrolls to another part of the page. Could it be scrolling to a set percentage of page (ie 25% of page)?
I also turned off the top scroll icon feature in the bottom right - but no change.
I had the same problem on other pages within the website with internal anchor links.

Cheers,
Ken

Hey Ken,

Since the anchor link is working when you disable the Advanced Ads -Sticky Ads it would best to check out to plugin author because our anchor link JS is working out of the box.

Just want to let you know that the said plugin is not part of the plugins that are tested for the compatibility of the theme: https://theme.co/docs/version-compatibility

That being said, reaching out to the plugin author is the best option to fix your issue.

Thank you.

Thanks. I contacted the Advanced Ads plugin developer and discovered it was a setting within the plugin that caused this issue.
For any others using Advanced Ads with a similar issue, I needed to disable the ‘Advanced Ads / Settings / Sticky Ads -> Check browser capability’ (Activate this if you experience problems with sticky ads and/or a lot of your visitors use old mobile devices. It will check browser capability and position the ad inline after scrolling. Technically speaking: removes position: fixed, if not supported.)

Cheers,
Ken

Hey Ken,

We’re glad that you’re able to figured it out!

Cheers!

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