I am trying to achieve the same result as in V1 where I am hiding the street address on all my listings using this css code:
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 .= ‘ Location: ‘;
$html .= ‘</span>’;
//print_r($_POST);
if($post->post_city){ $html .= ‘<span itemprop=”addressLocality”>’.$post->post_city.'</span>
‘;}
if($post->post_country){ $html .= ‘<span itemprop=”addressCountry”>’.$post->post_country.'</span>
‘;}
$html .= ‘
‘;
}
return $html ;
}
Not being a CSS expert, I was hoping I could add some CSS code to the GD Details Page Template (which is set up as default currently) or adding css code to the address Standard Field.
Bottom line is that my users are less interested in the exact address of the listing, more the city and country.