I was following directions for changing address look. I added Edit Snippet and added the below several ways and kept getting error messages. All error messages were between lines 29-35.
-The snippet has been deactivated due to an error on line 32:
syntax error, unexpected ”; ‘ (T_ENCAPSED_AND_WHITESPACE)
I kept trying different options and nothing worked. Also, If I want to remove country I would take out this line, correct?
if($post->post_country){ $html .= ‘<span itemprop=”addressCountry”>’.$post->post_country.'</span>
___________________________________
add_filter(‘geodir_show_post_address’, ‘geodir_change_address_order’ , 100 , 2) ;
function geodir_change_address_order($html , $vars)
{
global $post, $preview, $wpdb;
$field_icon=”;
if (strpos($field_icon,’http’) !== false) {$field_icon_af = ”;}
elseif($field_icon==”){$field_icon_af = ‘<i class=”fa fa-home”></i>’;}
else{$field_icon_af = $field_icon; $field_icon=”;}
if(!$preview)
{
$html = ‘
‘;
$html .= ‘<span class=”geodir-i-location” style=”‘.$field_icon.'”>’.$field_icon_af;
$html .= ‘ Address: ‘;
$html .= ‘</span>’;
//print_r($_POST);
if($post->post_address){ $html .= ‘
<span itemprop=”streetAddress”>’.$post->post_address.'</span>
‘;}
if($post->post_city){ $html .= ‘<span itemprop=”addressLocality”>’.$post->post_city.'</span> ‘;}
if($post->post_zip){ $html .= ‘<span itemprop=”postalCode”>’.$post->post_zip.'</span>
‘;}
if($post->post_country){ $html .= ‘<span itemprop=”addressCountry”>’.$post->post_country.'</span>
‘;}
if($post->post_region){}
‘;}
$html .= ‘
‘;
}
return $html ;
}