Created
March 21, 2020 14:33
-
-
Save Kyzoe/d87a53151758c994000eba7058b07528 to your computer and use it in GitHub Desktop.
bepaal de lokatie van een bezoeker op de frontpage van je mylisting irectory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function location_javascript() { | |
if (is_front_page()) { | |
?> | |
<script> | |
(function ($) { | |
$(document).ready(function(){ | |
setTimeout(function() { | |
$(".geocode-location").trigger('click'); | |
},10); | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
} | |
} | |
add_action('wp_head', 'location_javascript',1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment