-
AuthorPosts
-
January 26, 2022 at 8:56 pm #1337364
Hi,
On the mobile view the scroll position is to high (top). I loose the titel after I click on a link in the menu. How can I change this postion?January 27, 2022 at 9:46 am #1337440Hey niclasg,
Thank you for the inquiry.
Using this filter in the functions.php file should adjust the scroll position on mobile view.
function avf_header_setting_filter_mod($header) { if(!wp_is_mobile()) { $header['header_scroll_offset'] = $header['header_scroll_offset'] - 100; } return $header; } add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
Please make sure to purge the cache after adding the code.
Best regards,
IsmaelJanuary 27, 2022 at 3:48 pm #1337546Not working. Following error:
syntax error, unexpected ‘&’, expecting ‘]’
January 27, 2022 at 10:18 pm #1337582Not working at all
January 28, 2022 at 8:54 am #1337628Hi,
Thank you for the update.
Looks like some of the characters in the code were converted to their entity name. Did you copy the code from your email? Please make sure to copy it directly from this forum to avoid the character conversion. Let us know if that helps.
Best regards,
IsmaelJanuary 28, 2022 at 9:13 am #1337637Hi Ismael,
Unfortunately I can’t share pictures here. I am not sure what you mean. I add the code again in the functions.php (folder themes/endfold), at the bottom of the php. Please check and let me know how I can adjust it. Or please adjust it. Please help. The title is still under the menu.
January 28, 2022 at 12:07 pm #1337691Hi,
Thank you for following up.
We tried to access the site using the login account above, but it seems like the username doesn’t exist according to the login error. Please check the login info carefully or provide another admin account so that we can test the modification.
Best regards,
IsmaelJanuary 31, 2022 at 9:05 pm #1338088Please check
February 1, 2022 at 8:59 am #1338158Hi,
Thank you for the info.
The code is already added in the functions.php file when we checked and it adjusted the scroll position offset as expected. The header lands above the title now instead of covering it.
Best regards,
IsmaelFebruary 1, 2022 at 9:04 am #1338161No it doesn’t work on an iPhone for example.
I deleted all the cache, restarted the phone, but the Title like „Rollstuhlcar“ is still under the sticky header. Can I share pictures or a video?It just working if I using my desktop display on responsive view, but not at a real phone.
- This reply was modified 2 years, 9 months ago by niclasg.
February 2, 2022 at 12:01 pm #1338429Hi,
Thank you for the update.
Looks like the offset is reset to 0 on mobile view. Please edit the js > avia.js file, look for this code around line 758 and remove it. You may need to temporarily disable the Enfold > Performance > File Compression
settings after editing the file.if( isMobile ) { fixedMainPadding = 0; }
Best regards,
IsmaelFebruary 4, 2022 at 2:57 pm #1338912Hi Ismael,
I deleted the code. Now the title h1/h2/h3 etc. like “Krankenwagen” is in the middle of the screen. Can you please check and let me know how I can fix it.
I like that the title/box will be directly visible under the main menu. The title must be readable and not so much space to the menu.
KR
February 7, 2022 at 4:21 am #1339263Hi,
You have to remove the avf_header_setting_filter filter above or adjust the header_scroll_offset value a bit.
function avf_header_setting_filter_mod($header) { if(!wp_is_mobile()) { $header['header_scroll_offset'] = $header['header_scroll_offset'] - 100; } return $header; } add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
This line has to be adjusted.
$header['header_scroll_offset'] = $header['header_scroll_offset'] - 100;
Best regards,
IsmaelFebruary 7, 2022 at 5:41 pm #1339411Hi Ismael,
Looks ok for now. Thanks.
Can you re.open the topic:
https://kriesi.at/support/topic/fixed-sticky-header-on-mobile-iphone/Due to this code, Yigit shared with me, the scroll function is on mobile has a defect. After I clicked on a menu point and I wish up and down, it automatically changes the position.
February 7, 2022 at 6:39 pm #1339420 -
AuthorPosts
- You must be logged in to reply to this topic.