WordPress Tabs problem
-
Hi,
I have some problems when used in wordpress “Tabs” elements.
In the first tab everything is ok, in the second, third, etc it does not load the map correctly.
Can anything be done?
Thanks.M.
-
Hi @pakopakko,
Thanks for reaching out. I don’t really follow you, could you please provide some more details, ideally with a link to your site?
Cheers,
Joe
Hi Joe,
now there is another problem, backend only works on the first tab, frontend doesn’t work at all…
Wordpress 5.8.2, Avada theme v7.6…
Here a test link to the site (https://www.lestradedeivaldesi.com/itinerariofuturo/prigionia/)Cheers
M.
Hi @pakopakko,
I am seeing many console errors when I view your site, but nothing related to Waymark. My guess would be that these other errors are preventing Waymark from loading.
If I am missing something and you have found something that points towards a problem with Waymark, please do let me know.
Cheers,
Joe
Hi Joe,
sorry for errors, now there is just 4 “Uncaught ReferenceError: jQuery is not defined”.
I can’t understand if it’s a Waymark or wordpress or theme error or if I’m doing something wrong.
The test link it’s always the same.M.
Hi @pakopakko,
Uncaught ReferenceError: jQuery is not defined.
I see this too. There does appear to be a conflict. I recommend making a backup of your WordPress install and then systematically disabling other plugins one by one (starting with performance plugins), each time clearing your browser cache and checking to see if Waymark can load.
If you do identify an issue please do let me know!
Cheers,
Joe
Hi Joe,
i don’t have any performance plugins installed and even trying to disable them one by one, cleaning the cache every time, Waymark fails to load.
You think you can do something or I have to find another solution?Cheers,
M.
Hi @pakopakko,
I spent some time on this and the problem is that jQuery (a JavaScript library, required by Waymark) is being loaded inside the
<footer>element on your site, and not the<header>.I created this to show the results of adding it into the
<head>.This would be determined by your theme, but it is a bug in Waymark that this causes an error. I will look into a fix for this, but in the mean time you could try adding this to your (child) theme’s functions.php (from here and untested):
function insert_jquery(){ wp_enqueue_script('jquery', false, array(), false, false); } add_filter('wp_enqueue_scripts','insert_jquery',1)If that does not work, then you could try this work-around:
function head_add_jquery() { echo '<script type="text/javascript" src="https://www.lestradedeivaldesi.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0"></script>'; } add_action('wp_head', 'head_add_jquery');I hope this helps.
Cheers,
Joe
Hi Joe,
so, the second solution works but in part, there is always the problem of the second part of the page where in “Tappa2”, “Tappa3” it does not work correctly. I also tried to use different browsers but the result its the same.
Do you think it is possible to do something?M.
Hi @pakopakko,
This kind of integration is outside the scope of support for this plugin, but I came up with a quick JavaScript solution for you:
<script type="text/javascript"> jQuery(document).ready(function() { jQuery('.tab-link').each(function() { jQuery(this).on('click', function() { setTimeout(function() { window.dispatchEvent(new Event('resize')); }, 250); }); }); }); </script>You can see this working here.
I hope this helps.
Cheers,
Joe
What can I say, thank you so much for the help Joe!
Happy new year and good luck with everything!M.
The topic ‘WordPress Tabs problem’ is closed to new replies.