Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //create map args
- function wds_map_build_markers($baja_listings='',$class=''){
- global $post,$wpdb;
- if(!$baja_listings){
- $baja_listings=array($post);
- }
- $x=0;
- //print_r($baja_listings);
- foreach ( $baja_listings as $post ){
- $location_id=$post->ID;
- //echo "location_id: ".$location_id."<br>";
- $address = get_post_meta( $location_id, 'property-address', true );
- $lat = get_post_meta( $location_id, '_wds_map_latitude', true );
- $lng = get_post_meta( $location_id, '_wds_map_longitude', true );
- if($lat && $lng){
- $show_map=1;
- $args[$x]=array($location_id.$class,'','',$lat,$lng,$entry_url,'',$post->post_title,$html);
- $x+=1;
- }
- }
- if($show_map){
- //print_r($args);
- echo wds_map_load_markers($args,'250px','100%','no',$class);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement