• Skip to primary navigation
  • Skip to main content

WP Discuss

Wordpress Research & Analytic

  • Submit
  • Disclaimers
  • About
  • DMCA
  • Privacy Policy
  • Contact

Alturas lng

  • No categories
  • All

Post title and url not showing on google map marker

December 25, 2018 by Leave a Comment

I have managed to show multiple markers but I can't show the post title and to make the same post title as URL to go to a single page. function myMap() { var myCenter = new google.maps.LatLng(44.794426, 20.451849); var mapProp = {center:myCenter, zoom:15, scrollwheel:false, draggable:true, mapTypeId:google.maps.MapTypeId.ROADMAP}; var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); var myJsarray = passed_object.retrieve_data; var latitute = '' ; var longitute = ''; var lng = passed_object.lng; var lat = passed_object.lat; var content= passed_object.var1; var post_title=content.post_title for (var i=0; i<lng.length; i++) { var marker=new google.maps.Marker({ position: new google.maps.LatLng( lat[i].lat , lng[i].lng), map: map, title: content[i].post_title, url:content[i].post_url, content:content[i].post_title, label: { text: content, color: "#000", fontSize: "16px", fontWeight: "bold", } }); } google.maps.event.addListener(marker, 'click', function() { … [Read more...] about Post title and url not showing on google map marker

Learn More

Post title and url not showing on google map marker [SOLVED]

December 25, 2018 by Leave a Comment

I have managed to show multiple markers but I can't show the post title and to make the same post title as URL to go to a single page. Here is the code in functions.php $args = array('post_type' => 'post',array( 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'lng', ), array( 'key' => 'lat', ) ) )); $loop = new WP_Query($args); while ( $loop->have_posts() ) : $loop->the_post(); $title = get_the_title(); $post_category=get_the_category(); $post_category_name=$post_category[0]->cat_name; $permalink=get_the_permalink(); $lng = get_post_meta( get_the_ID(), 'lng', TRUE ); $lat = get_post_meta( get_the_ID(), 'lat', TRUE ); $lnglat=$lng.",".$lat; $arrlatlng[]=array( "lnglat"=>$lnglat, "post_title"=>$title, 'post_category'=>$post_category_name, 'post_url'=>$permalink); $longitude[]=array('lng'=>$lng); $latitude[]=array('lat'=>$lat); endwhile; $passedValues = array( 'retrieve_data' => $retrieve_data, 'var1' => … [Read more...] about Post title and url not showing on google map marker [SOLVED]

Learn More

Google Maps and Google Earth, google maps google maps, maps or google maps, Google Maps or Google Earth, How to Download Offline Maps in Google Maps, Google Maps Google, Google Earth or Google Maps, google google maps, google maps url, google map marker

Filtering markers on google map by WordPress category[SOLVED]

December 27, 2018 by Leave a Comment

I have created the Google map with posts as markers but no I want to filter those markers by category and I’m stuck. Here is my code: functions.php $args = array('post_type' => 'post',array( 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'lng', ), array( 'key' => 'lat', ) ) )); $loop = new WP_Query($args); while ( $loop->have_posts() ) : $loop->the_post(); $title = get_the_title(); $post_category=get_the_category(); $post_category_name=$post_category[0]->cat_name; $permalink=get_the_permalink(); $lng = get_post_meta( get_the_ID(), 'lng', TRUE ); $lat = get_post_meta( get_the_ID(), 'lat', TRUE ); $lnglat=$lng.",".$lat; $arrlatlng[]=array( "lnglat"=>$lnglat, "post_title"=>$title, 'post_category'=>$post_category_name, 'post_url'=>$permalink); $longitude[]=array('lng'=>$lng); $latitude[]=array('lat'=>$lat); endwhile; $passedValues = array( 'retrieve_data' => $retrieve_data, 'var1' => … [Read more...] about Filtering markers on google map by WordPress category[SOLVED]

Learn More

sebm-google-map-marker icon url, sebm-google-map-marker style, sebm-google-map-marker multiple markers, sebm-google-map-marker size, bouncing marker google maps, understand pins and markers google maps, numbered markers google maps, bounds marker google maps, marker animation google maps, marker api google maps

Ajax not working to insert, query and result data

June 22, 2016 by Leave a Comment

On my site, through a form I send/register same information in database, do a SELECT/query and return it! Return the last table saved in database, just that user just entered on the form (along with some more information coming from the database). How I want to display these values coming from databse in a modal bootstrap it's necessary that the page doesn't give the refresh. For this, I inserted the AJAX as follows: $(document).ready(function(){ $('#enviar').click(function(){ $.ajax({ //CAAL AJAX IN WORDPRESS url: 'wp-admin/admin-ajax.php', type: 'POST', //INSERT, QUERY AND DISPLAYS TO USER data: 'action=prancha', error: function(){ alert('ERRO!!!'); }, //IF OK, DISPLAYS TO USER IN DIV "RESULT" success: function(data){ $('#result').html(data); } }); }); }); MY FUNCTIONS.PHP: function prancha(){ header('Content-Type: text/html; charset=utf-8'); include "../../../wp-config.php"; /* DECLARING THE VARIABLES */ $nome = ""; $email = ""; $estilo = ""; $experiencia = ""; $altura = ""; … [Read more...] about Ajax not working to insert, query and result data

Learn More

query has no destination for result data, query has no destination for result data postgresql, 42601 query has no destination for result data, wp_insert_post_data not working

setcookie() issues on running with HTTPS on WordPress

January 3, 2019 by Leave a Comment

I have set 2 custom cookies to be saved when user clicks a button that runs the script to save the cookies. The issue is that I need these to be saved through HTTPS because I am using them on a store locator page, and need a secured connection to allow for location detection to happen properly. When I do not add TRUE for secure connection and leave code as shown below, the cookies save just fine when running through HTTP. setcookie('lat', $_POST['lat'], time()+62208000, '/', $_SERVER['HTTP_HOST']); setcookie('lng', $_POST['lng'], time()+62208000, '/', $_SERVER['HTTP_HOST']); However, when I try to add TRUE for secure connection as shown below, it does not work properly with HTTPS running: setcookie('lat', $_POST['lat'], time()+62208000, '/', $_SERVER['HTTP_HOST'], TRUE); setcookie('lng', $_POST['lng'], time()+62208000, '/', $_SERVER['HTTP_HOST'], TRUE); I have tried including httponly as either TRUE or FALSE as well, but nothing seems to have worked. If anyone could give any tip … [Read more...] about setcookie() issues on running with HTTPS on WordPress

Learn More

wordpress theme https

Copyright © 2021 WP Discuss. Power by Wordpress.