-
AuthorPosts
-
September 30, 2018 at 7:57 pm #1016310
Hello to all,
I need help with:
When a visitor is on page (for example) Contact, and user will click in main menu on the item Contact, page is not opened/reloaded again. Nothing is happening.
Is here somebody who knows some magic php snippet for function.php which will resolve it please?
I just need to have actual page reloaded from menu, even user is on the same page.Thank you!
Best wishes,
MilanPS: I will be happy when a moderator will fix title – idem to item :D
- This topic was modified 6 years, 2 months ago by Dude. Reason: idem to item
September 30, 2018 at 9:12 pm #1016336Hey Milan,
Please try to add this code to the child theme functions.php:
function avia_custom_js_footer_code(){ ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".avia-menu a").click(function(){ location.reload(true); }); }); </script> <?php } add_action('wp_footer', 'avia_custom_js_footer_code');
Best regards,
PeterOctober 1, 2018 at 9:29 am #1016481Thank you Peter,
We are nearly there! :) I should say I am using burger menu – so when I will click on burger menu icon, page is reloaded and I don’t have a chance to see menu. Is it possible to add some an exception for the burger menu icon?
Milan
PS: thanks for fixing my thread title!
October 1, 2018 at 9:40 am #1016486Hi,
Please try this code instead:
function avia_custom_js_footer_code(){ ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".avia-menu li:not(.menu-item-avia-special) a").click(function(){ location.reload(true); }); }); </script> <?php } add_action('wp_footer', 'avia_custom_js_footer_code');
Best regards,
PeterOctober 1, 2018 at 9:50 am #1016491Perfect, resolved! Thank you very much!
Have a great day!
MilanOctober 1, 2018 at 10:00 am #1016503Hi!
Great, glad I could help you :)
Cheers!
PeterFebruary 26, 2020 at 1:08 pm #1188055Hi, I still seem to have a problem with the hamburger menu.
I used the second snippet of code and pasted in the functions.php file; it works superfine on the desktop version, but the mobile menu reloads the same page over and over, regardless what page I click on the menu.
Can you help me?
Thanks :)February 26, 2020 at 7:53 pm #1188215Hi grendelica,
Please start a separate thread, describe your issue there and give us a link to your website.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.