Thanks for your help!
I read another topic on this forum where I can change the address and added that snippet into my WP account.
function gd_custom_sd_details_output_address( $address = ” ) {
global $post;
$sd_address = ‘<div class=”sd-address”>’;
if (isset($post->post_address) && $post->post_address) {
$sd_address .= apply_filters(‘sd_detail_post_add’, $post->post_address, $post);
}
$sd_address .= ‘</div>’;
$sd_address .= ‘<div class=”sd-address”>’;
if ( geodir_is_page( ‘detail’ ) && !empty( $post ) && !empty( $post->post_neighbourhood ) && !empty( $post->country_slug ) && defined( ‘GEODIRLOCATION_VERSION’ ) ) {
if ( get_option( ‘location_neighbourhoods’ ) && $neighbourhood_info = geodir_location_get_neighbourhood_by_id( $post->post_neighbourhood, true, $post->post_location_id ) ) {
$sd_address .= ‘<div class=”sd-neighbourhood” style=”clear:both;”><span class=”geodir-i-neighbourhood” style=””><i class=”fa fa-location-arrow”></i> ‘ . __( ‘Neighbourhood:’, ‘geodirectory’ ) . ‘ </span> ‘ . $neighbourhood_info->hood_name . ‘</div>’ . $social;
}
}
$sd_address .= ‘</div>’;
$sd_address .= ‘<div class=”sd-address”>’;
if (isset($post->post_city) && $post->post_city) {
$sd_address .= apply_filters(‘sd_detail_city_name’, $post->post_city, $post);
}
if (isset($post->post_region) && $post->post_region) {
$sd_address .= ‘, ‘ . apply_filters(‘sd_detail_region_name’, $post->post_region, $post);
}
if (isset($post->post_country) && $post->post_country) {
$sd_address .= ‘, ‘ . apply_filters(‘sd_detail_country_name’, __($post->post_country, ‘geodirectory’), $post);
}
$sd_address .= ‘</div>’;
return $sd_address;
}
add_filter( ‘sd_details_output_address’, ‘gd_custom_sd_details_output_address’, 10, 2 );
Without this snippet there was only a city name and now people can see directly where it is located.
I also want to add the city name in the sidebar because there was just a ZIP code and no city name.
Do I need to add another code for that?
/edit:
How can I translate/edit the “Write a review” button into my native language?