Hello, this php file (geodirectory/geodirectory-functions/custom_fields_output_functions.php) file outputs custom fields entered within the theme. I’ve pasted some of the code below where it outputs the address. I am going to remove some of the <br> and add in some commas to make the address format look more standard. I don’t want to lose this if there is an update. I’ve tried to follow some of the other forums, but not quite understanding where to put the modified function and what to do with the old one. Function is: function geodir_cf_address($html,$location,$cf,$p=”)
$html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $html_var . '" style="clear:both;" itemscope itemtype="https://schema.org/PostalAddress">';
$html .= '<span class="geodir-i-location" style="' . $field_icon . '">' . $field_icon_af;
$html .= ( trim( $cf['site_title'] ) ) ? __( $cf['site_title'], 'geodirectory' ) . ': ' : ' ';
$html .= '</span>';
if ( isset($post->post_address) ) {
$html .= '<span itemprop="streetAddress">' . $post->post_address . '</span><br>';
}
if ($show_city_in_address && isset( $post->post_city ) && $post->post_city ) {
$html .= '<span itemprop="addressLocality">' . $post->post_city . '</span><br>';
}
if ($show_region_in_address && isset( $post->post_region ) && $post->post_region ) {
$html .= '<span itemprop="addressRegion">' . $post->post_region . '</span><br>';
}
if ($show_zip_in_address && isset( $post->post_zip ) && $post->post_zip ) {
$html .= '<span itemprop="postalCode">' . $post->post_zip . '</span><br>';
}
if ($show_country_in_address && isset( $post->post_country ) && $post->post_country ) {
$html .= '<span itemprop="addressCountry">' . __( $post->post_country, 'geodirectory' ) . '</span><br>';
}
$html .= '</div>';