Show address
This topic contains 8 replies, has 3 voices, and was last updated by Giri 6 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
June 22, 2017 at 9:26 pm #384398June 22, 2017 at 9:27 pm #384399This reply has been marked as private.June 22, 2017 at 10:39 pm #384404
Please update GD and both your themes first.
I cannot find anything that is hiding that, but it may be because you need to update.Thanks
June 23, 2017 at 5:53 pm #384539Thanks for looking into it Guust. I will update the themes and the GD plugin.
Edit: After the updates I don’t see any changes unfortunatly.
June 30, 2017 at 8:59 pm #385348Any other thoughts?
June 30, 2017 at 11:25 pm #385357I cannot find the problem, I’ll get someone else to have a closer look. That may only be after the weekend though.
ThanksJuly 3, 2017 at 1:12 pm #385523Hi Nick, I don’t quite understand your address structure.
I see different address in sidebar and different address in the featured area. (right next to author avatar)
Did you customize those parts by adding any snippets?
Please elaborate what you did. So I can assist you better.
Thanks
July 6, 2017 at 12:49 pm #385902Thanks 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?
July 7, 2017 at 1:06 pm #385992Hi Nick, just discussed with my team.
You need location manager addon. You might have used that addon and then disabled city, region options
Please activate that addon and then visit Place settings > Custom fields > Address > Enable city option there.
You can deactivate the plugin after that if you don’t want multilocation.
Hope that helps.
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket