/* Taxonomy Query */ $map_args['tax_query'] = array(array('taxonomy' => $wp_query->query_vars['taxonomy'], 'field' => 'slug', 'terms' => $wp_query->query_vars['term'])); } $map_query = new WP_Query($map_args); $properties_data = array(); if ($map_query->have_posts()) { while ($map_query->have_posts()) { $map_query->the_post(); $map_property = new Inspiry_Property(get_the_ID()); $current_prop_array = array(); // Property Title $current_prop_array['title'] = get_the_title(); // Property Price $current_prop_array['price'] = $map_property->get_price(); // Property Location $property_location = $map_property->get_location(); if (!empty($property_location)) { $current_prop_array['lat'] = $map_property->get_latitude(); $current_prop_array['lng'] = $map_property->get_longitude(); } // Property Thumbnail if (has_post_thumbnail()) { $image_id = get_post_thumbnail_id(); $image_attributes = wp_get_attachment_image_src($image_id, 'post-thumbnail'); if (!empty($image_attributes[0])) { $current_prop_array['thumb'] = $image_attributes[0]; } } // Property Permalink $current_prop_array['url'] = get_permalink(); // Property Map Icon Based on Property Type
*/ get_template_part('partials/property/single/title'); } /* * Content - contains description, additional details, features and video */ get_template_part('partials/property/single/content'); ?> </article> <?php /* * Map */ if ($inspiry_options['inspiry_property_map']) { $address = $inspiry_single_property->get_address(); $location = $inspiry_single_property->get_location(); if (!empty($address) && !empty($location)) { get_template_part('partials/property/single/map'); } } /* * Attachments */ if ($inspiry_options['inspiry_property_attachments']) { get_template_part('partials/property/single/attachments'); } /* * Share this property */ if ($inspiry_options['inspiry_property_share']) { get_template_part('partials/property/single/share');