Hello, I’m experiencing a problem when using links to specific id sections on other pages.
When clicking on a link pointing to a specific #ID on homepage, it doesn’t go to the right anchor of the page… sometimes it goes to the middle of the desired section, sometimes on a totally different section…
It’s really problematic…
Do you have a solution?
Thanks a lot in advance!
Hey maxgorelkine,
Thank you for the inquiry.
This might have something to do with the previous header modification. You may need to add the following filter in the functions.php file to adjust the scroll offset in order to take into account the adjustments from the previous modification.
function avf_header_setting_filter_mod($header) {
$header['header_scroll_offset'] = $header['header_scroll_offset'] - 150;
return $header;
}
add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
Best regards,
Ismael
Hello Ismael,
Thank you very much. Actually this code allowed me to resolve my other problem
But unfortunately, not the anchor problem. Actually, I noticed that on Chrome, there was no issue, but on Firefox and Safari, when I’m on a portfolio page and click on a button linking to anchor #films on home page, it goes under the section #films and shows most of the next #contact section
Hi,
Thanks for your patience and the link to your site, I tested your link on Windows in Chrome, Firefox, & Edge, and Mac Safari, Firefox, and Chrome and on each when I clicked the close “X” the section #films is centered in the page. These are the browser versions I tested with:
Mac:
Chrome v107
Firefox v106
Safari v16.1
Windows:
Firefox v107
Chrome v107
Edge v107
Best regards,
Mike