
-
AuthorPosts
-
August 20, 2025 at 9:06 pm #1488326
Hello dear helpers,
I search to change the anchors and the redirections of all the scroll down links who are in the fullscreen sliders in my website (www.kerry-han.fr), can someone tell me if it’s possible ?
Thanks, best regards.
August 21, 2025 at 4:56 pm #1488370Hey Alexandre,
Those “next section” arrows are built in and seem to be working correctly. Are finding that they don’t go enough or too far?
Try this solutionBest regards,
MikeAugust 21, 2025 at 5:01 pm #1488371This helps me a lot but the offset works only on desktop and not on mobile and tablet, can you help me to make it work on it ?
August 24, 2025 at 1:57 pm #1488464Hi,
Thanks for your patience, I see that you are forcing a fixed header for mobile which is not a theme option, which is ok, but the problem is that the solution is written in PHP, so the avf_header_setting_filter is applied in PHP before the page is rendered, so it can’t directly detect the screen size. (PHP runs server-side, screen width is only known client-side in the browser).
If the above solution worked for you then try also adding this to your functions.php file:add_action('wp_head', function () { ?> <style> :root { --scroll-offset: 48px; } @media (max-width: 767px) { :root { --scroll-offset: 80px; } } @media (min-width: 768px) and (max-width: 1023px) { :root { --scroll-offset: 64px; } } </style> <script> (function($){ $(function(){ if (typeof avia_header_scroll_offset !== 'undefined') { var offset = getComputedStyle(document.documentElement) .getPropertyValue('--scroll-offset'); avia_header_scroll_offset = parseInt(offset, 10); } }); })(jQuery); </script> <?php });
If this doesn’t work then you should remove both and use javascript, let us know.
Best regards,
MikeAugust 25, 2025 at 10:28 am #1488489Your first response work but not with phone and tablet and i try to modify the code to make the offset bigger and see a difference but it don’t works, what can i do ?
August 25, 2025 at 11:12 pm #1488507Hi,
Ok, please remove all of the code and we will try a javascript solution.
An admin login may help us.Best regards,
MikeAugust 26, 2025 at 9:40 am #1488532Ok i send login in private content of this message. Thanks a lot.
August 26, 2025 at 8:58 pm #1488561Hi,
Thanks, but I get this error:
Error: This password does not match the username.
Please check.Best regards,
MikeAugust 26, 2025 at 9:13 pm #1488563Retry now for me it works and if you search some menus in the toolbar you can show them on admin menu editor in the settings.
August 26, 2025 at 11:38 pm #1488569Hi,
Thanks I was able to login, but this is tricker than I thought, I will work on it some more and get back to you tomorrow.Best regards,
MikeAugust 29, 2025 at 3:16 pm #1488736Hi,
Thanks for your patience, I believe that it is sorted out now, clear your browser cache and check.
This is the code that I added:function custom_offset_script_with_width() { ?> <script> (function($) { $('a[href*="#next-section"]').click(function() { var width = $(window).width() if ($(window).width() < 768) { $('html,body').animate({ scrollTop: $(this).offset().top - 100 //offsets for mobile fixed header }, 1000); return false; } else if (width >= 768 && width <= 1366) { $('html,body').animate({ scrollTop: $(this).offset().top - 75 //offsets for tablet fixed header }, 1000); return false; } else { $('html,body').animate({ scrollTop: $(this).offset().top - 50 //offsets for desktop fixed header }, 1000); return false; } }); }(jQuery)); </script> <?php } add_action('wp_footer', 'custom_offset_script_with_width');
Best regards,
MikeAugust 29, 2025 at 3:43 pm #1488737Hello Mike,
I just wanted to thank you for your help and your speed during our conversations !
All works perfectly and that’s what i wanted to see on my website.
But i hope you can help me more because i recently make the update of my website (6.0.2 to 7.1.2) and some little things changed and crashed on my website. I think i can solve some of those problems but i need help with the 2 timelines on my website here :
http://www.kerry-han.fr
and here
http://www.kerry-han.fr/agenda
In fact the timelines works on desktop but not really in phone and tablet. And for the others things, all the scroll down buttons on fullscreen sliders disapears and also scroll up button and also the arrows to change article and finally my search bar and search icon disapears also ! 😭
So if you can help me mike or you know someone else on the support who can do this, text me here please i really need help !😅Best regards !
-
This reply was modified 1 week, 6 days ago by
VachetAlexandre.
-
This reply was modified 1 week, 6 days ago by
VachetAlexandre.
August 29, 2025 at 6:24 pm #1488749Hi,
Glad this helps, your icons are not showing because of this css you had in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:/*Modification de l'affichage de l'icône des cookies (cadenas)*/ #top .avia-svg-icon.avia-font-svg_entypo-fontello svg:first-child { display: none !important; }
I disabled it for you.
As for your timeline question, please open a new thread as we ask that each thread sticks to one topic. Thanks for you understanding.Best regards,
Mike -
This reply was modified 1 week, 6 days ago by
-
AuthorPosts
- The topic ‘Change anchors of scroll down link buttons’ is closed to new replies.