We have been running into this issue for a bunch of website that have no desire to show the Google map first in the sidebar. In fact, a better portion of the community wants the ad details in the sidebar!
Sometimes developing websites is funny. You can spend hours of time in research and testing to come up with only 3-4 lines of code which fixes the problem. Non-developers probably wonder “Why did it take them so long to come up with that?!” What you don’t see is the 500-600 other variations of the code we had to try before we got something that works. So here is about 4 hours of research and development that’s broken down to a mere few lines of code…
Place this code at the bottom of your custom sidebar-ad.php file.
<script type="text/javascript"> jQuery('.tabprice ul.tabnavig li a').click(function() { if(jQuery(this).attr('href') == '#priceblock1') { //the element has to be visible on the page for google maps to render properly jQuery('#priceblock1').show(); //rebuild the google map canvas to the proper size google.maps.event.trigger(map, 'resize'); //ClassiPress javascript function to build map at address codeAddress(); } }); </script>
© Copyright 2023 Sethmatics Websites All Rights Reserved.
Love to be able to make this change and change the other tabs on the home page that say random and most popular to particular categories instead.
Thanks!
Yes, we didn’t make a complete tutorial on adding a new tab yet, but we can. We will make that our next tutorial. As for changing the homepage tabs, that’s actually as simple as finding the function that queries the posts and changing the parameters… then I suppose you need to change the labels of the tabs too.
Testing