Guest User

Untitled

a guest
Jul 15th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.50 KB | None | 0 0
  1. <div id="content" class="single col-full">
  2.  
  3.  
  4.  
  5. <?php if (have_posts()) : $count = 0; ?>
  6. <?php while (have_posts()) : the_post(); $count++; ?>
  7.  
  8. <?php
  9. global $post;
  10. $post_type = $post->post_type;
  11.  
  12. //Custom meta boxes
  13. $property_onshow = get_post_meta($post->ID,'on_show',true);
  14. $property_address = get_post_meta($post->ID,'address',true);
  15. $property_garages = get_post_meta($post->ID,'garages',true);
  16. $property_beds = get_post_meta($post->ID,'beds',true);
  17. $property_baths = get_post_meta($post->ID,'bathrooms',true);
  18. $property_size = get_post_meta($post->ID,'size',true);
  19. $property_price = get_post_meta($post->ID,'price',true);
  20. $property_sale_type = get_post_meta($post->ID,'sale_type',true);
  21. if ($property_sale_type == 'rent') {
  22. $property_sale_metric = get_post_meta($post->ID,'sale_metric',true);
  23. switch ($property_sale_metric) {
  24. case "Per Week":
  25. $property_sale_metric = '/week';
  26. break;
  27. case "Per Month":
  28. $property_sale_metric = '/month';
  29. break;
  30. }
  31. } else {
  32. $property_sale_metric = '';
  33. }
  34. //format price
  35. $property_price = number_format($property_price , 0 , '.', '.');
  36. if (get_option('woo_clickable_additional_features') == 'true') {
  37. $features_list = get_the_term_list( $post->ID, 'propertyfeatures', '' , '|' , '' );
  38. } else {
  39. $features_list = strip_tags(get_the_term_list( $post->ID, 'propertyfeatures', '' , '|' , '' ));
  40. }
  41. $features_array = explode('|', $features_list);
  42. //setup locations array
  43. $locations_list = get_the_term_list( $post->ID, 'location', '' , '|' , '' );
  44. $locations_list = strip_tags($locations_list);
  45. $locations_array = explode('|', $locations_list);
  46. $location_results = '';
  47. foreach ($locations_array as $location_item) {
  48. $location_id = get_term_by( 'name', $location_item, 'location' );
  49. $location_results = $location_id->slug.',';
  50. }
  51. ?>
  52.  
  53. <?php if(get_option('woo_displaysearch_single') == 'true') { include(TEMPLATEPATH . '/includes/property-search.php'); } ?>
  54. <div id="single-property" class="fl">
  55.  
  56. <div class="breadcrumb">
  57. <?php
  58. if(function_exists('bcn_display'))
  59. {
  60. bcn_display();
  61. }
  62. ?>
  63. </div>
  64. <!-- START TITLE -->
  65.  
  66. <div class="property-title-top">
  67.  
  68. <div class="property-title"><?php the_title(); ?></div><!-- /.property-title -->
  69.  
  70. <div class="property-price"><?php echo $woo_options['woo_estate_currency'].''.$property_price.$property_sale_metric; ?></div></div>
  71.  
  72. <div class="clearfix"></div>
  73.  
  74. <div class="property-title-bottom">
  75.  
  76. <div class="property-address"><?php if ( ($post_type == 'woo_estate') && ($property_address != '') ) { ?><?php echo $property_address; ?><?php } ?></div><!-- /.property-address -->
  77.  
  78. <div class="property-id-no"><?php _e('Property ID','woothemes'); ?>: <?php echo $woo_options['woo_estate_property_prefix'].$post->ID; ?></div><!-- /.property-id-no --></div><!-- /.property-title-bottom -->
  79.  
  80.  
  81.  
  82.  
  83. <div class="clearfix"></div>
  84.  
  85.  
  86.  
  87. <!-- //END TITLE -->
  88.  
  89.  
  90. <!-- START PROPERTY CONTENT -->
  91. <!-- START META BAR (PRICE, FEATURES, CONTACT) -->
  92.  
  93. <?php if ($post_type == 'woo_estate') { ?>
  94.  
  95.  
  96.  
  97.  
  98. <div class="fix"></div>
  99.  
  100.  
  101.  
  102. <?php } ?>
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. <div <?php post_class(); ?>>
  110.  
  111. <div class="entry> <?php if(!$gallery){ echo 'no-gallery'; }?>">
  112.  
  113. </div><!-- /.entry -->
  114. <?php if ( $post_type == 'woo_estate' ) { ?>
  115.  
  116. <?php if ($features_list != '') { ?>
  117.  
  118.  
  119. <?php } ?>
  120.  
  121.  
  122.  
  123. <?php $gallery = do_shortcode('[gallery size="thumbnail" columns="4"]'); ?>
  124.  
  125.  
  126.  
  127. <?php if($gallery){ ?>
  128.  
  129.  
  130.  
  131. <?php } ?>
  132.  
  133.  
  134. <?php echo do_shortcode('[gallery option1="value1"]'); ?>
  135.  
  136.  
  137.  
  138.  
  139. <div id="request-wrapper">
  140.  
  141.  
  142.  
  143.  
  144.  
  145. <div class="requestnew"><b><?php _e('Minat properti ini?',woothemes); ?></b><?php _e(' ',woothemes); ?><?php _e('Call',woothemes); ?><b><?php _e(' ',woothemes); ?><?php the_author_meta('contact_number_primary'); ?></b><?php _e(' ',woothemes); ?><?php _e('or ',woothemes); ?><?php _e(' ',woothemes); ?><a href="#request-details"><span class="button"><?php _e('Request Details', 'woothemes'); ?></span></a></div><!-- /.requestnew -->
  146.  
  147.  
  148.  
  149.  
  150.  
  151. </div><!-- /#request-wrapper -->
  152.  
  153.  
  154.  
  155. <div class="break-line"></div>
  156. <br>
  157.  
  158.  
  159. <ul class="tabs">
  160. <li><a href="#tab1">Information</a></li>
  161. <li><a href="#tab2">Description</a></li>
  162. <li><a href="#maptab">Map</a></li>
  163. <li><a href="#tab4">Agent Profile</a></li>
  164. </ul>
  165.  
  166. <div class="tab_container">
  167. <div id="tab1" class="tab_content">
  168. <h2 class="heading"><?php _e('Property Information', 'woothemes'); ?></h2>
  169. <div class="featureswrap">
  170.  
  171. <div class="features">
  172.  
  173. <ul>
  174. <?php if ( ($property_size != '') || ($property_size > 0) ) { ?>
  175. <li class="size">
  176. <span><img src="<?php echo $woo_options['woo_size_logo_big']; ?>" alt="Property size" /></span>
  177. <span><?php echo $property_size; ?> <?php echo $woo_options['woo_label_size_metric']; ?></span>
  178. </li>
  179. <?php } ?>
  180. <?php if ( ($property_garages != '') || ($property_garages > 0) ) { ?>
  181. <li class="garage">
  182. <span><img src="<?php echo $woo_options['woo_garage_logo_big']; ?>" alt="Property size" /></span>
  183. <span><?php echo $property_garages; ?> <?php if ($property_garages <= 1) { echo $woo_options['woo_label_garage']; } else { echo $woo_options['woo_label_garages']; } ?></span>
  184. </li>
  185. <?php } ?>
  186. <?php if ( ($property_beds != '') || ($property_beds > 0) ) { ?>
  187. <li class="bed">
  188. <span><img src="<?php echo $woo_options['woo_bed_logo_big']; ?>" alt="Property size" /></span>
  189. <span><?php echo $property_beds; ?> <?php if ($property_beds <= 1) { echo $woo_options['woo_label_bed']; } else { echo $woo_options['woo_label_beds']; } ?></span>
  190. </li>
  191. <?php } ?>
  192. <?php if ( ($property_baths != '') || ($property_baths > 0) ) { ?>
  193. <li class="bath">
  194. <span><img src="<?php echo $woo_options['woo_bath_logo_big']; ?>" alt="Property size" /></span>
  195. <span><?php echo $property_baths; ?> <?php if ($property_baths <= 1) { echo $woo_options['woo_label_bath']; } else { echo $woo_options['woo_label_baths']; } ?></span>
  196. </li>
  197. <?php } ?>
  198. </ul>
  199.  
  200. <div class="fix"></div>
  201.  
  202. </div><!-- /.features -->
  203. </div><!-- /.featureswrap -->
  204. </div>
  205. <div id="tab2" class="tab_content">
  206. <?php if ($features_list != '') { ?>
  207.  
  208. <div class="sub-features">
  209.  
  210.  
  211.  
  212. <h2 class="heading"><?php _e('Property Features', 'woothemes'); ?></h2>
  213.  
  214.  
  215.  
  216. <ul>
  217. <?php foreach ($features_array as $feature_item) { ?>
  218. <li><?php echo $feature_item; ?></li>
  219. <?php } ?>
  220. </ul>
  221.  
  222. <div class="fix"></div>
  223.  
  224. </div><!-- /.sub-features -->
  225.  
  226. <div class="break-line"></div>
  227. <br>
  228. <!-- //END META BAR -->
  229. <?php } ?>
  230. <h2 class="heading"><?php _e('Property Description', 'woothemes'); ?></h2>
  231.  
  232. <div class="property-description"><?php the_content(); ?></div>
  233. <br>
  234. <div class="break-line"></div>
  235. <div class="fix"></div>
  236.  
  237. </div>
  238. <div id="maptab" class="tab_content">
  239. <?php
  240. $maps_active = get_post_meta($post->ID,'woo_maps_enable',true);
  241. $src = get_post_meta($post->ID,'image',true);
  242. ?>
  243. <?php if($maps_active) { $video = woo_embed('width=600&height=243'); } else { $video = woo_embed('width=940&height=243'); } ?>
  244.  
  245. <?php if($maps_active == 'on') { ?>
  246.  
  247. <div class="map">
  248.  
  249. <h2 class="heading"><?php _e('Property Map', 'woothemes'); ?></h2>
  250.  
  251. <?php
  252. if($maps_active == 'on'){
  253. $mode = get_post_meta($post->ID,'woo_maps_mode',true);
  254. $streetview = get_post_meta($post->ID,'woo_maps_streetview',true);
  255. $address = get_post_meta($post->ID,'woo_maps_address',true);
  256. $long = get_post_meta($post->ID,'woo_maps_long',true);
  257. $lat = get_post_meta($post->ID,'woo_maps_lat',true);
  258. $pov = get_post_meta($post->ID,'woo_maps_pov',true);
  259. $from = get_post_meta($post->ID,'woo_maps_from',true);
  260. $to = get_post_meta($post->ID,'woo_maps_to',true);
  261. $zoom = get_post_meta($post->ID,'woo_maps_zoom',true);
  262. $type = get_post_meta($post->ID,'woo_maps_type',true);
  263. $yaw = get_post_meta($post->ID,'woo_maps_pov_yaw',true);
  264. $pitch = get_post_meta($post->ID,'woo_maps_pov_pitch',true);
  265. if(!empty($lat) OR !empty($from)){
  266. woo_maps_single_output("mode=$mode&streetview=$streetview&address=$address&long=$long&lat=$lat&pov=$pov&from=$from&to=$to&zoom=$zoom&type=$type&yaw=$yaw&pitch=$pitch");
  267. }
  268. }
  269. ?>
  270.  
  271.  
  272.  
  273. </div><!-- /.map -->
  274. </div>
  275. <div id="tab4" class="tab_content">
  276. <!--Content-->
  277. </div>
  278. </div>
  279.  
  280.  
  281.  
  282.  
  283. <br>
  284. <div class="break-line"></div>
  285. <br>
  286.  
  287.  
  288. <br>
  289.  
  290. <a name="request-details"></a>
  291. <h2 class="heading">Request details about <?php if ( ($post_type == 'woo_estate') && ($property_address != '') ) { ?><?php echo $property_address; ?><?php } ?></h2>
  292.  
  293. <div class="c7form"></div><?php echo do_shortcode( '[contact-form 1 "Contact form 1"]' ); ?></div><!-- c7form-->
  294. <br>
  295. <div class="break-line"></div>
  296. <br>
  297.  
  298. <br>
  299. <div class="break-line"></div>
  300.  
  301. <br>
  302. <h6><?php _e('Disclaimer', 'woothemes'); ?></h6>
  303. <br>
  304.  
  305. <div class="disclaimer"><b><?php _e('Property ID','woothemes'); ?>: <?php echo $woo_options['woo_estate_property_prefix'].$post->ID; ?></b>. <?php _e(' The information displayed above about this property comprises a property advertisement. Oemah.com makes no warranty as to the accuracy or completeness of the advertisement or any linked or associated information, and Oemah has no control over the content. This property advertisement does not constitute property particulars. The information is provided and maintained by ', 'woothemes'); ?><b><?php echo the_author_meta('last_name'); ?></font><?php _e(', ',woothemes); ?><?php echo the_author_meta('contact_number'); ?></b>.</div>
  306. <br>
  307. <div class="break-line"></div>
  308. <br>
  309.  
  310.  
  311. <?php } ?>
  312.  
  313. <?php if (!empty($video)){ ?>
  314.  
  315. <div class="video">
  316.  
  317. <h2 class="heading"><?php echo $woo_options['woo_label_virtual_tour']; ?></h2>
  318.  
  319. <div class="video">
  320. <?php echo $video; ?>
  321. </div><!-- /.video -->
  322.  
  323. </div><!-- /.video -->
  324.  
  325. <?php } ?>
  326.  
  327. <?php } ?>
  328.  
  329. <?php
  330. $location_results = chop($location_results,',');
  331. $query_args = array( 'post_type' => 'woo_estate',
  332. 'post__not_in' => array($post->ID),
  333. 'location' => $location_results,
  334. 'posts_per_page' => 3,
  335. 'orderby' => 'rand'
  336. );
  337. $related_query = new WP_Query($query_args);
  338. if ($related_query->have_posts()) : $count = 0; ?>
  339.  
  340. <br>
  341. <h2 class="heading"><?php _e('More properties in this area', 'woothemes'); ?></h2>
  342. <div class="related-properties">
  343.  
  344.  
  345.  
  346. <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
  347.  
  348. <div class="related-post">
  349.  
  350. <a href="<?php the_permalink() ?>"><?php woo_image('width=150&height=113&class=thumbnail&link=img'); ?></a>
  351.  
  352.  
  353.  
  354. <div class="related-post-price">Rp.<? echo get_post_meta($post->ID, 'price', true) ?>
  355.  
  356.  
  357.  
  358. <? echo get_post_meta($post->ID, 'sale_metric', true) ?> </div><!-- /.related-post-price- -->
  359.  
  360. <div class="related-post-address"><a href="<?php the_permalink() ?>"><?php
  361. $trim_length = 16; //desired length of text to display
  362. $custom_field = 'address';
  363. $value = get_post_meta($post->ID, $custom_field, true);
  364. if ($value) {
  365. echo rtrim(substr($value,0,$trim_length)). '...</p>';
  366. }
  367. ?></a></div><!-- /.related-post-address- -->
  368.  
  369.  
  370. <div class="related-post-beds"><? echo get_post_meta($post->ID, 'beds', true) . ' Bed Property</p>' ?> </div><!-- /.related-post-beds- -->
  371.  
  372. <p>This author's AIM address is <?php the_author_meta('contact_number_primary'); ?></p>
  373.  
  374. </div><!-- /.related-post- -->
  375.  
  376. <?php endwhile; ?>
  377.  
  378. </div><!-- /.related-properties -->
  379.  
  380.  
  381. <?php else: endif; ?>
  382.  
  383. </div><!-- /.post -->
  384.  
  385. </div><!-- /#single-property -->
  386.  
  387.  
  388. <!-- //END PROPERTY CONTENT -->
  389.  
  390. <?php endwhile; ?>
  391. <?php endif; ?>
  392.  
  393. <div class="listing-sidebar"><?php get_sidebar(); ?></div>
  394.  
  395. <div class="fix"></div>
Add Comment
Please, Sign In to add comment