-
AuthorPosts
-
November 20, 2017 at 4:14 pm #879186
Hey!
I have a weird problem with the navigation on my one-page website. All navigation items seem to work fine except for one. When I open the site and press on that one navigation item, before pressing anything else, it scrolls down to the wrong place. But if I press that one item after pressing on one or more of the other ones, it scrolls to the correct place.I’ve tried checking if there’s any problem with the IDs, but can’t seem to find any.
Hope you can help.
November 21, 2017 at 10:16 am #879599Hey Estra,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardNovember 21, 2017 at 11:28 am #879651This reply has been marked as private.November 24, 2017 at 9:47 pm #881409Hi,
We can check but can you let us know which navigation it is?
Best regards,
BasilisNovember 27, 2017 at 10:04 am #882137This reply has been marked as private.November 28, 2017 at 5:32 am #882504Hi,
Thank you for the info. The issue is caused by the masonry items. The offset caculation is incorrect because the height of the masonry container is recalculated on scroll. Please add the following css code to disable the masonry items’ animation or display them on initial load.
.avia_desktop.avia_transform3d .av-masonry-entry.av-masonry-item-loaded .av-inner-masonry { -webkit-animation: none; animation: none; } .av-masonry-entry { opacity: 1; visibility: visible; }
Best regards,
IsmaelNovember 28, 2017 at 10:34 am #882552I realized that the menu items in question only work correctly if I first scroll down to the masonry items and let them load. If I just reload the site and click directly on either of menu items (without scrolling at all), then it just scrolls down to the bottom. It seems to do this regardless if I implement your solutions or not.
Your first solution seems to remove the animations and your second solution makes the items visible on load, but still runs the animations when I scroll down to them.
Neither of the solutions seem to resolve the issue, but the problem definitely seems to be the masonry items.November 30, 2017 at 1:48 pm #883413Hi,
Thank you for the update. The site is using a very old version of the theme, 3.8. Please upgrade to version 4.2. After the update, add this filter in the functions.php file.
// custom script add_action( 'wp_footer', 'ava_custom_script' ); function ava_custom_script() { ?> <script type="text/javascript"> (function($) { $(window).trigger('av-height-change debouncedresize'); })(jQuery); </script> <?php }
If you have the time, please create a child theme.
// https://kriesi.at/documentation/enfold/using-a-child-theme/
Best regards,
IsmaelNovember 30, 2017 at 1:50 pm #883414Ok, thanks. I will try that when I get the chance.
November 30, 2017 at 2:55 pm #883453Hi,
Alright. Please let us know once the theme is updated. You might need to reconfigure the theme options after the update.
Best regards,
IsmaelJanuary 5, 2018 at 1:45 pm #893708Hi again.
I’ve updated my theme to version 4.2, but I would rather not make a child theme now, since that means I would have to reconfigure the theme options, like you said.I’ve tried adding the PHP code above to the functions.php file through the editor, but it doesn’t seem to have any effect on the issue. Do I need to make a child theme and add the code to the functions.php file there, in order for it to work?
January 7, 2018 at 8:08 pm #894451Hi Estra,
No, the code should work in the parent theme as well. But of course, it is highly recommended to have a child theme.
Best regards,
VictoriaJanuary 19, 2018 at 2:27 pm #899706Ok. I’ve tried adding the code to the functions.php file, but it doesn’t seem to have any effect on the issue.
January 20, 2018 at 4:11 am #899961Hi,
since that means I would have to reconfigure the theme options, like you said.
You don’t need to reconfigure the theme options completely. You can import the theme settings after creating a child theme.
// https://kriesi.at/documentation/enfold/using-a-child-theme/
Please provide the login details in the private field so that we can test it.
Best regards,
IsmaelJanuary 22, 2018 at 10:09 am #900714This reply has been marked as private.January 23, 2018 at 5:42 am #901161Hi,
We would like to edit the js > shortcodes.js file via the Appearance > Editor panel but WordPress is not updated to the latest version, 4.9. Please upgrade WordPress or modify the js > shortcodes.js file, look for this code around line 1587:
if(isMobile) { start_animation(); } else { masonry.waypoint(start_animation , { offset: '80%'} ); }
Replace it with:
start_animation();
Best regards,
IsmaelJanuary 23, 2018 at 1:31 pm #901440I have updated WordPress, so feel free to try out your solution.
January 24, 2018 at 3:37 am #901846Hi,
Thank you for the update. We did the modification and the anchor is working properly now. It’s not working before because the height of the masonry container is calculated on scroll.
Best regards,
IsmaelJanuary 24, 2018 at 10:17 am #902019Great! Thank you!
Since I’m not using a child theme, the modification will be overwritten when I update the theme, right? I can of course just re-implement it, but I can’t seem to locate the code snippet in the shortcodes.js file.January 25, 2018 at 5:54 am #902561Hi,
Look for the “avia_masonry” function and you’ll find the code inside.
start_animation();
Best regards,
IsmaelApril 25, 2018 at 2:11 am #946337Hello there,
I have a similar issue. on my posthttps://aimonas.gr/wp/%CF%86%CF%89%CF%84%CE%BF%CE%B3%CF%81%CE%B1%CF%86%CE%AF%CE%B5%CF%82/%CE%B1%CE%90%CE%BC%CE%BF%CE%BD%CE%B1%CF%82/%CF%84%CE%BF-%CF%87%CF%89%CF%81%CE%B9%CF%8C/.
I have a masonry gallery with the option display navigation. Below I got another masonry wit post tags. When I click the next page to display next images the second masonry with the post tags does not appear at all.
Could you please assist.Thank you!
April 26, 2018 at 11:41 am #947209 -
AuthorPosts
- The topic ‘One-page navigation not working properly when first accessing site.’ is closed to new replies.