I found this script in forum, but have some problem i hope somebody can fix this
function retrieve_var1_replacement( $var1 ) {
$location_terms=geodir_get_current_location_terms();
$city=$location_terms['gd_city'];
$region=$location_terms['gd_region'];
$country=$location_terms['gd_country'];
if(!empty($city))
return $city ;
if(!empty($region))
return $region ;
if(!empty($country))
return $country ;
return '';
}
function register_my_plugin_extra_replacements() {
wpseo_register_var_replacement( '%%current_location%%', 'retrieve_var1_replacement', 'advanced', 'Use this is for current location' );
}
add_action( 'wpseo_register_extra_replacements', 'register_my_plugin_extra_replacements' );
?>
I use in location “quận tân bình” but result is “quan-tan-binh” how to fix this to see result is “quận tân bình”?
And i need 1 variable include “city, state, country”