I wanted to make the address be only 2 lines and I also wanted a get directions button that opens a new window in google maps.
I modified custom_fields_functions.php lines 1868-1776 as seen bellow.
It works great, but my question is how can I do this in a way that is not obliterated on update?
Additionally, is there a way to use the 2 letter state code (WI fir Wisconsin and so on)?
if($preview){ $html .= stripslashes($post->$html_var).$addition_fields.'</p>' ;}
else{
if($post->post_address){ $html .= '<span itemprop="streetAddress">'.$post->post_address.'</span><br>';}
if($post->post_city){ $html .= '<span itemprop="addressLocality">'.$post->post_city.'</span>, ';}
if($post->post_region){ $html .= '<span itemprop="addressRegion">'.$post->post_region.'</span> ';}
if($post->post_zip){ $html .= '<span itemprop="postalCode">'.$post->post_zip.'<br><br></span> ';}
if($post->post_address){ $html .= '<a href="https://www.google.com/maps/place/'.$post->post_address.' '.$post->post_city.' '.$post->post_zip.'" target="_blank" class="geodir_dirbtn"><i class="fa fa-car" style="padding-right:10px"></i> Directions</a>';}
$html .= '</div>';
}