I’ve tried for a few days and can’t get this to work. Using Supreme, I’d like to hide the address and map on the detail page.
I’ve added this to show package ID and this part works!
// add the package id to the body
add_filter( ‘body_class’, ‘my_add_package_class’,10,1 );
function my_add_package_class($class){
global $post;
if (geodir_is_page(‘detail’) && isset($post->package_id)) {
$class[] = “gd-package-id-“.$post->package_id;
}
return $class;
}
I’ve also added to show full address at top of page and this works!
add_filter(‘sd_details_output_address’, ‘modify_sd_details_output_address’);
function modify_sd_details_output_address() {
global $post;
$sd_address = ‘<div class=”sd-address”>’;
if (isset($post->post_address) && $post->post_address) {
$sd_address .= apply_filters(‘sd_detail_address’, $post->post_address, $post);
}
if (isset($post->post_city) && $post->post_city) {
$sd_address .= ‘<br/>’ . 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_zip) && $post->post_zip) {
$sd_address .= ‘, ‘ . apply_filters(‘sd_detail_zip’, $post->post_zip, $post);
}
$sd_address .= ‘</div>’;
return $sd_address;
}
NOW – I wand to hide address and map based on package types gd-package-id-24, gd-package-id-28 , etc.
CAN anyone tell me what the CSS is to do this? I’ve tried to do this for a few days and can’t get it to work!
Here is a listing that I’d like to hide address and map on https://foxchainguide.com/food_drink/johnsburg/restaurant/wave-bar-grille/
Thanks!!